public class AtomImpl extends ExperimentObject
NO_KEY
Constructor and Description |
---|
AtomImpl()
Empty default constructor.
|
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() |
String |
toString(boolean isotopeCurlyBrackets)
Returns the atom as a string.
|
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public AtomImpl()
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 String toString(boolean isotopeCurlyBrackets)
isotopeCurlyBrackets
- if true, the isotopes are indicated as curly
brackets after the atom, e.g. carbon 13 is written as C{13}, if false,
the isotopes are indicated as a number before the atom, e.g. carbon 13 is
written as 13Cpublic 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 © 2021. All rights reserved.