Class ElementaryElement
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.atoms.ElementaryElement
- All Implemented Interfaces:
Serializable
public class ElementaryElement extends ExperimentObject
This class can be used to retrieve elementary elements like a neutron.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static ElementaryElement
neutron
A neutron.static double[]
neutronMassMultiples
Cache for the multiples of the neutron mass. -
Constructor Summary
Constructors Constructor Description ElementaryElement()
Empty default constructor. -
Method Summary
Modifier and Type Method Description double
getMass()
Returns the mass of the element.String
getName()
Returns the name of the element.static double
getNeutronMassMultiple(int i)
Returns the mass of the neutron multiplied by i.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
neutron
A neutron. -
neutronMassMultiples
public static double[] neutronMassMultiplesCache for the multiples of the neutron mass.
-
-
Constructor Details
-
ElementaryElement
public ElementaryElement()Empty default constructor.
-
-
Method Details
-
getNeutronMassMultiple
public static double getNeutronMassMultiple(int i)Returns the mass of the neutron multiplied by i. If i is smaller or equal to ten a value in cache is used. It is calculated otherwise. Throws an exception for negative i without sanity check.- Parameters:
i
- i- Returns:
- the mass of the neutron multiplied by i
-
getName
Returns the name of the element.- Returns:
- the name of the element
-
getMass
public double getMass()Returns the mass of the element.- Returns:
- the mass of the element
-