Class DoubleParameter

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

    public class DoubleParameter
    extends NumberParameter<DoubleParameter,​java.lang.Double>
    Parameter class for a parameter specifying a double value.
    Since:
    0.1
    Author:
    Steffi Wanka, Erich Schubert
    • Constructor Detail

      • DoubleParameter

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

        public DoubleParameter​(OptionID optionID)
        Constructs a double parameter with the given optionID.
        Parameters:
        optionID - the unique id of 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:
        "<double>"
      • doubleValue

        public double doubleValue()
        Get the parameter value as double.
        Returns:
        double value
      • grab

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