Class AtomImpl
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.atoms.AtomImpl
- All Implemented Interfaces:
Serializable
public class AtomImpl extends ExperimentObject
Class for a specific atom.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method 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.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
Method Details
-
getMass
Returns the mass of the atom. Null if not implemented.- Returns:
- the mass of the atom
-
getIsotopeNumber
Returns the isotope number corresponding to the given rounded mass. e.g. returns +1 for 13 if the atom is C. Null if no isotope was found.- Parameters:
roundedMass
- the rounded mass as integer- Returns:
- the isotope number
-
toString
-
toString
Returns the atom as a string.- Parameters:
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 13C- Returns:
- the atom as a string
-
isSameAs
Indicates whether another atom is the same as this one.- Parameters:
anotherAtom
- another atom of interest- Returns:
- a boolean indicating whether another atom is the same as this one
-
getAtomSymbol
Returns the atom symbol as specified in the Atom class.- Returns:
- the atom symbol
-
setAtomSymbol
Sets the atom symbol as specified in the Atom class.- Parameters:
atomSymbol
- the atom symbol
-
getIsotope
Returns the isotope, 0 for monoisotope.- Returns:
- the isotope
-
setIsotope
Sets the isotope, 0 for monoisotope.- Parameters:
isotope
- the isotope
-