Class DoubleArgument.DoubleParser<C>

  • All Implemented Interfaces:
    ArgumentParser<C,​java.lang.Double>
    Enclosing class:
    DoubleArgument<C>

    public static final class DoubleArgument.DoubleParser<C>
    extends java.lang.Object
    implements ArgumentParser<C,​java.lang.Double>
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleParser​(double min, double max)
      Construct a new double parser
    • Method Summary

      Modifier and Type Method Description
      double getMax()
      Get the max value
      double getMin()
      Get the min value
      boolean isContextFree()
      Check whether or not this argument parser is context free.
      @NonNull ArgumentParseResult<java.lang.Double> parse​(@NonNull CommandContext<C> commandContext, @NonNull java.util.Queue<@NonNull java.lang.String> inputQueue)
      Parse command input into a command result
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DoubleParser

        public DoubleParser​(double min,
                            double max)
        Construct a new double parser
        Parameters:
        min - Minimum value
        max - Maximum value
    • Method Detail

      • parse

        public @NonNull ArgumentParseResult<java.lang.Double> parse​(@NonNull CommandContext<C> commandContext,
                                                                    @NonNull java.util.Queue<@NonNull java.lang.String> inputQueue)
        Description copied from interface: ArgumentParser
        Parse command input into a command result
        Specified by:
        parse in interface ArgumentParser<C,​java.lang.Double>
        Parameters:
        commandContext - Command context
        inputQueue - The queue of arguments
        Returns:
        Parsed command result
      • isContextFree

        public boolean isContextFree()
        Description copied from interface: ArgumentParser
        Check whether or not this argument parser is context free. A context free parser will not use the provided command context, and so supports impromptu parsing
        Specified by:
        isContextFree in interface ArgumentParser<C,​java.lang.Double>
        Returns:
        true if the parser is context free, else false
      • getMax

        public double getMax()
        Get the max value
        Returns:
        Max value
      • getMin

        public double getMin()
        Get the min value
        Returns:
        Min value