use crate::superscript::Superscript;
use std::{format, string::String};
use super::Isotope;
impl Isotope {
pub fn display_with_name(&self) -> String {
format!("{}-{}", self.element().name(), self.mass_number())
}
pub fn display_with_symbol(&self) -> String {
format!("{}-{}", self.element().symbol(), self.mass_number())
}
pub fn display_with_superscript(&self) -> String {
format!(
"{}{}",
Superscript::new(self.mass_number()),
self.element().symbol()
)
}
}