Class ElementaryElement
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.atoms.ElementaryElement
- All Implemented Interfaces:
Serializable
This class can be used to retrieve elementary elements like a neutron.
- Author:
- Marc Vaudel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ElementaryElementA neutron.static double[]Cache for the multiples of the neutron mass.Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMass()Returns the mass of the element.getName()Returns the name of the element.static doublegetNeutronMassMultiple(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
-