java.lang.Object
com.compomics.util.experiment.biology.ions.Charge

public class Charge
extends Object
This class contains convenience methods for the handling of charges.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Details

    • Charge

      public Charge()
      Empty default constructor.
  • Method Details

    • toString

      public static String toString​(int value)
      Returns a string representing the charge. For example 2+.
      Parameters:
      value - the value of the charge
      Returns:
      charge as a string
    • getChargeAsFormattedString

      public static String getChargeAsFormattedString​(int value)
      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 +