com.compomics.util.experiment.biology.ions
Class ElementaryIon

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.biology.Ion
          extended by com.compomics.util.experiment.biology.ions.ElementaryIon
All Implemented Interfaces:
Serializable, Cloneable

public class ElementaryIon
extends Ion

This class represents an elementary ion

Author:
marc
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.compomics.util.experiment.biology.Ion
Ion.IonType
 
Field Summary
static ElementaryIon proton
          A proton
static int PROTON
          subtype int for a proton
 
Fields inherited from class com.compomics.util.experiment.biology.Ion
theoreticMass, type
 
Constructor Summary
ElementaryIon(String name, double theoreticMass, int subType)
          Constructor
 
Method Summary
 String getName()
          Returns the name of the ion.
 ArrayList<NeutralLoss> getNeutralLosses()
          Returns the possible neutral losses of this ion type.
static ArrayList<Integer> getPossibleSubtypes()
          Returns an arraylist of possible subtypes
 CvTerm getPrideCvTerm()
          Returns the pride cv term adapted to the fragment ion.
 int getSubType()
          Returns the ion subtype.
 String getSubTypeAsString()
          Returns the subtype as string.
 boolean isSameAs(Ion anotherIon)
          Returns a boolean indicating whether the ion is the same as another ion.
 
Methods inherited from class com.compomics.util.experiment.biology.Ion
getGenericIon, getGenericIon, getImplementedIonTypes, getNeutralLossesAsString, getNeutralLossesAsString, getPossibleSubtypes, getTheoreticMass, getType, getTypeAsString, getTypeAsString, setTheoreticMass
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTON

public static final int PROTON
subtype int for a proton

See Also:
Constant Field Values

proton

public static final ElementaryIon proton
A proton

Constructor Detail

ElementaryIon

public ElementaryIon(String name,
                     double theoreticMass,
                     int subType)
Constructor

Parameters:
name - the name of the ion
theoreticMass - the theoretic mass of the ion
subType - the subtype index
Method Detail

getName

public String getName()
Description copied from class: Ion
Returns the name of the ion. The name should be short enough to be displayed on a spectrum.

Specified by:
getName in class Ion
Returns:
the name of the ion

getPrideCvTerm

public CvTerm getPrideCvTerm()
Description copied from class: Ion
Returns the pride cv term adapted to the fragment ion. null if none corresponding.

Specified by:
getPrideCvTerm in class Ion
Returns:
the pride cv term adapted to the fragment ion. null if none corresponding

getSubType

public int getSubType()
Description copied from class: Ion
Returns the ion subtype.

Specified by:
getSubType in class Ion
Returns:
the ion subtype as integer

getSubTypeAsString

public String getSubTypeAsString()
Description copied from class: Ion
Returns the subtype as string.

Specified by:
getSubTypeAsString in class Ion
Returns:
the subtype as string

getPossibleSubtypes

public static ArrayList<Integer> getPossibleSubtypes()
Returns an arraylist of possible subtypes

Returns:
an arraylist of possible subtypes

getNeutralLosses

public ArrayList<NeutralLoss> getNeutralLosses()
Description copied from class: Ion
Returns the possible neutral losses of this ion type. An empty list if none.

Specified by:
getNeutralLosses in class Ion
Returns:
the possible neutral losses of this ion type

isSameAs

public boolean isSameAs(Ion anotherIon)
Description copied from class: Ion
Returns a boolean indicating whether the ion is the same as another ion.

Specified by:
isSameAs in class Ion
Parameters:
anotherIon - the other ion
Returns:
a boolean indicating whether the ion is the same as another ion


Copyright © 2013. All Rights Reserved.