Class OptionInfo


  • public class OptionInfo
    extends java.lang.Object
    Holds some description about a particular option, including its name, its aliases, whether the option was explicitly set by the user, and information concerning its value. The valueInfo member holds any of the following alternatives:
    • OptionInfo.VoidInfo if the option holds no value (or the value has no native type)
    • OptionInfo.ValueInfo if the option is of type boolean or String, holds the current value and the default value.
    • OptionInfo.NumberInfo if the option is of type BigInteger or double, holds the current and default value, as well as the minimum and maximum.
    • OptionInfo.ModeInfo if the option is a mode option, holds the current and default values, as well as a list of valid modes.
    Additionally, this class provides convenience functions to obtain the current value of an option in a type-safe manner using booleanValue(), stringValue(), intValue(), and doubleValue(). They assert that the option has the respective type and return the current value.
    • Field Detail

      • pointer

        protected long pointer
    • Method Detail

      • deletePointer

        protected void deletePointer​(long pointer)
      • getPointer

        public long getPointer()
      • toString

        public java.lang.String toString()
      • toString

        protected java.lang.String toString​(long pointer)
        Returns:
        A string representation of this OptionInfo.
      • getName

        public java.lang.String getName()
      • getAliases

        public java.lang.String[] getAliases()
      • getSetByUser

        public boolean getSetByUser()
      • booleanValue

        public boolean booleanValue()
        Obtain the current value as a boolean. Asserts that valueInfo holds a boolean.
      • stringValue

        public java.lang.String stringValue()
        Obtain the current value as a string. Asserts that valueInfo holds a string.
      • intValue

        public java.math.BigInteger intValue()
        Obtain the current value as as int. Asserts that valueInfo holds an int.
      • doubleValue

        public double doubleValue()
        Obtain the current value as a double. Asserts that valueInfo holds a double.
      • deletePointer

        public void deletePointer()