peakml.chemistry
Enum Mass

java.lang.Object
  extended by java.lang.Enum<Mass>
      extended by peakml.chemistry.Mass
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Mass>

public enum Mass
extends java.lang.Enum<Mass>

In chemistry two methods for calculating the mass of a molecule are used. The one used for mixtures is molecular weight, which is calculated by taking all the isotopic forms of elements into account and scaling then to their natural occurance. For mixtures this is the ideal weight, because molecules with isotope forms occur in their natural abundances. The second is used when only the most abundant isotope is taken into account.


Enum Constant Summary
MOLECULAR
          The mass is calculated with the masses of all the isotopes as they occur naturally.
MONOISOTOPIC
          The mass is calculated with the mass of the most common isotopes for C, O, etc.
 
Method Summary
static Mass valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Mass[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MOLECULAR

public static final Mass MOLECULAR
The mass is calculated with the masses of all the isotopes as they occur naturally.


MONOISOTOPIC

public static final Mass MONOISOTOPIC
The mass is calculated with the mass of the most common isotopes for C, O, etc.

Method Detail

values

public static Mass[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Mass c : Mass.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Mass valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null