com.compomics.util.experiment.massspectrometry
Class Charge

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.massspectrometry.Charge
All Implemented Interfaces:
Serializable, Cloneable

public class Charge
extends ExperimentObject

This class models a charge. Created by IntelliJ IDEA. User: Marc Date: Jun 23, 2010 Time: 10:01:29 AM

See Also:
Serialized Form

Field Summary
static int MINUS
          static int to modele a negative charge
static int NEUTRAL
          static int to modele a neutral component
static int PLUS
          static int to modele a positive charge
 int sign
          sign of the charge according to the static fields
 int value
          value of the charge
 
Constructor Summary
Charge(int sign, int value)
          constructor for a charge
 
Method Summary
 String getChargeAsFormattedString()
          Returns the charge as a string of +.
 String toString()
          returns a string representing the charge
 
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, wait, wait, wait
 

Field Detail

PLUS

public static final int PLUS
static int to modele a positive charge

See Also:
Constant Field Values

MINUS

public static final int MINUS
static int to modele a negative charge

See Also:
Constant Field Values

NEUTRAL

public static final int NEUTRAL
static int to modele a neutral component

See Also:
Constant Field Values

sign

public int sign
sign of the charge according to the static fields


value

public int value
value of the charge

Constructor Detail

Charge

public Charge(int sign,
              int value)
constructor for a charge

Parameters:
sign - sign of the charge as specified in static fields
value - value of the charge
Method Detail

toString

public String toString()
returns a string representing the charge

Overrides:
toString in class Object
Returns:
charge as a string

getChargeAsFormattedString

public String getChargeAsFormattedString()
Returns the charge as a string of +. One for each charge. A charge of 1 however returns the empty string.

Returns:
the charge as a string of +


Copyright © 2012. All Rights Reserved.