Class LongParameter

  • All Implemented Interfaces:
    Parameter<java.lang.Long>

    public class LongParameter
    extends NumberParameter<LongParameter,​java.lang.Long>
    Parameter class for a parameter specifying a long value.
    Since:
    0.3
    Author:
    Steffi Wanka, Erich Schubert
    • Constructor Detail

      • LongParameter

        public LongParameter​(OptionID optionID,
                             long defaultValue)
        Constructs a long parameter with the given optionID and default value.
        Parameters:
        optionID - the unique OptionID for this parameter
        defaultValue - the default value
      • LongParameter

        public LongParameter​(OptionID optionID)
        Constructs a long parameter with the given optionID.
        Parameters:
        optionID - the unique OptionID for this parameter
    • Method Detail

      • getValueAsString

        public java.lang.String getValueAsString()
        Description copied from interface: Parameter
        Get the value as string. May return null
        Returns:
        Value as string
      • getSyntax

        public java.lang.String getSyntax()
        Returns a string representation of the parameter's type.
        Returns:
        "<long>"
      • grab

        public boolean grab​(Parameterization config,
                            java.util.function.LongConsumer consumer)
        Get the parameter.
        Parameters:
        config - Parameterization
        consumer - Output consumer
        Returns:
        true if valid