Enum Class IntegerFormat

java.lang.Object
java.lang.Enum<IntegerFormat>
docking.widgets.textfield.integer.IntegerFormat
All Implemented Interfaces:
Serializable, Comparable<IntegerFormat>, Constable

public enum IntegerFormat extends Enum<IntegerFormat>
Input formats for entering integers into a text field such as the IntegerTextField or FixedSizeIntegerTextField
  • Enum Constant Details

  • Method Details

    • values

      public static IntegerFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IntegerFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Returns the short name of this number format.
      Returns:
      the short name of this number format
    • getDescription

      public String getDescription()
      Returns a descriptive name of this number format.
      Returns:
      a descriptive name of this number format
    • format

      public String format(BigInteger value)
      Converts the given value into a string representation corresponding to this number format.
      Parameters:
      value - the value to format into a string
      Returns:
      A string representation of the given value.
    • parse

      public BigInteger parse(String text)
      Parses the given string into a BigInteger or null if the string is not properly structured for this number format.
      Parameters:
      text - the text to parse into a BigInteger
      Returns:
      the BigInteger interpretation of the given string for this number format.
    • getPrefix

      public String getPrefix()
      Returns the prefix associated with this format.
      Returns:
      the prefix associated with this format
    • isUnsigned

      public boolean isUnsigned()
      Return true if this format is intended only for non-negative values. This is more of a hint to the client text field to determine if "-" characters are allowed to be entered.
      Returns:
      true if this format is for unsigned numbers