public class Isotope extends Element implements Serializable, IIsotope, Cloneable
Isotope carbon = new Isotope("C", 13);
A full specification can be constructed with:
// make deuterium Isotope carbon = new Isotope(1, "H", 2, 2.01410179, 100.0);
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
Modifier and Type | Field and Description |
---|---|
Double |
exactMass
Exact mass of this isotope.
|
Double |
naturalAbundance
Natural abundance of this isotope.
|
atomicNumber
Constructor and Description |
---|
Isotope(IElement element)
Constructs an empty by copying the symbol, atomic number,
flags, and identifier from the given IElement.
|
Isotope(int atomicNumber,
String elementSymbol,
double exactMass,
double abundance)
Constructor for the Isotope object.
|
Isotope(int atomicNumber,
String elementSymbol,
int massNumber,
double exactMass,
double abundance)
Constructor for the Isotope object.
|
Isotope(String elementSymbol)
Constructor for the Isotope object.
|
Isotope(String elementSymbol,
int massNumber)
Constructor for the Isotope object.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this
IChemObject . |
boolean |
compare(Object object)
Compares an isotope with this isotope.
|
Double |
getExactMass()
Gets the ExactMass attribute of the Isotope object.
|
Integer |
getMassNumber()
Returns the atomic mass of this element.
|
Double |
getNaturalAbundance()
Gets the NaturalAbundance attribute of the Isotope object.
|
void |
setExactMass(Double exactMass)
Sets the ExactMass attribute of the Isotope object.
|
void |
setMassNumber(Integer massNumber)
Sets the atomic mass of this element.
|
void |
setNaturalAbundance(Double naturalAbundance)
Sets the NaturalAbundance attribute of the Isotope object.
|
String |
toString()
A string representation of this isotope.
|
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
addListener, addProperties, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
public Double exactMass
public Double naturalAbundance
public Isotope(String elementSymbol)
elementSymbol
- The element symbol, "O" for Oxygen, etc.public Isotope(int atomicNumber, String elementSymbol, int massNumber, double exactMass, double abundance)
atomicNumber
- The atomic number of the isotopeelementSymbol
- The element symbol, "O" for Oxygen, etc.massNumber
- The atomic mass of the isotope, 16 for Oxygen, e.g.exactMass
- The exact mass of the isotope, be a little more explicit here :-)abundance
- The natural abundance of the isotopepublic Isotope(int atomicNumber, String elementSymbol, double exactMass, double abundance)
atomicNumber
- The atomic number of the isotope, 8 for OxygenelementSymbol
- The element symbol, "O" for Oxygen, etc.exactMass
- The exact mass of the isotope, be a little more explicit here :-)abundance
- The natural abundance of the isotopepublic Isotope(String elementSymbol, int massNumber)
elementSymbol
- The element symbol, "O" for Oxygen, etc.massNumber
- The atomic mass of the isotope, 16 for Oxygen, e.g.public Isotope(IElement element)
element
- IElement to copy information frompublic void setNaturalAbundance(Double naturalAbundance)
setNaturalAbundance
in interface IIsotope
naturalAbundance
- The new NaturalAbundance valuegetNaturalAbundance()
public void setExactMass(Double exactMass)
setExactMass
in interface IIsotope
exactMass
- The new ExactMass valuegetExactMass()
public Double getNaturalAbundance()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getNaturalAbundance
in interface IIsotope
setNaturalAbundance(java.lang.Double)
public Double getExactMass()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getExactMass
in interface IIsotope
setExactMass(java.lang.Double)
public Integer getMassNumber()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getMassNumber
in interface IIsotope
setMassNumber(Integer)
public void setMassNumber(Integer massNumber)
setMassNumber
in interface IIsotope
massNumber
- The atomic mass to be assigned to this elementgetMassNumber()
public String toString()
toString
in interface IChemObject
toString
in class Element
public boolean compare(Object object)
public Object clone() throws CloneNotSupportedException
ChemObject
IChemObject
. It clones the identifier, flags,
properties and pointer vectors. The ChemObjectListeners are not cloned, and
neither is the content of the pointer vectors.clone
in interface IChemObject
clone
in class Element
CloneNotSupportedException
- if the IChemObject cannot be clonedCopyright © 2018. All Rights Reserved.