public class AtomImpl extends Object implements Serializable
Constructor and Description |
---|
AtomImpl(Atom atom,
Integer isotope)
Constructor.
|
AtomImpl(String atomSymbol,
Integer isotope)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAtomSymbol()
Returns the atom symbol as specified in the Atom class.
|
Integer |
getIsotope()
Returns the isotope, 0 for monoisotope.
|
Integer |
getIsotopeNumber(Integer roundedMass)
Returns the isotope number corresponding to the given rounded mass.
|
Double |
getMass()
Returns the mass of the atom.
|
boolean |
isSameAs(AtomImpl anotherAtom)
Indicates whether another atom is the same as this one.
|
void |
setAtomSymbol(String atomSymbol)
Sets the atom symbol as specified in the Atom class.
|
void |
setIsotope(Integer isotope)
Sets the isotope, 0 for monoisotope.
|
String |
toString() |
public AtomImpl(String atomSymbol, Integer isotope)
atomSymbol
- the symbol of the atomisotope
- the isotope, 0 for monoisotopepublic Double getMass()
public Integer getIsotopeNumber(Integer roundedMass)
roundedMass
- the rounded mass as integerpublic boolean isSameAs(AtomImpl anotherAtom)
anotherAtom
- another atom of interestpublic String getAtomSymbol()
public void setAtomSymbol(String atomSymbol)
atomSymbol
- the atom symbolpublic Integer getIsotope()
public void setIsotope(Integer isotope)
isotope
- the isotopeCopyright © 2019. All rights reserved.