Class Charge
java.lang.Object
com.compomics.util.experiment.biology.ions.Charge
This class contains convenience methods for the handling of charges.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetChargeAsFormattedString(int value) Returns the charge as a string of + or -.static StringtoString(int value) Returns a string representing the charge.
-
Constructor Details
-
Charge
public Charge()Empty default constructor.
-
-
Method Details
-
toString
Returns a string representing the charge. For example 2+.- Parameters:
value- the value of the charge- Returns:
- charge as a string
-
getChargeAsFormattedString
Returns the charge as a string of + or -. One for each charge. A charge of +1 however returns the empty string.- Parameters:
value- the value of the charge- Returns:
- the charge as a string of +
-