Class IntegerArgument.IntegerParser<C>

    • Constructor Detail

      • IntegerParser

        public IntegerParser​(int min,
                             int max)
        Construct a new integer parser
        Parameters:
        min - Minimum acceptable value
        max - Maximum acceptable value
    • Method Detail

      • getSuggestions

        public static @NonNull List<@NonNull StringgetSuggestions​(long min,
                                                                    long max,
                                                                    @NonNull String input)
        Get integer suggestions. This supports both positive and negative numbers
        Parameters:
        min - Minimum value
        max - Maximum value
        input - Input
        Returns:
        List of suggestions
      • getMin

        public int getMin()
        Get the minimum value accepted by this parser
        Returns:
        Min value
      • getMax

        public int getMax()
        Get the maximum value accepted by this parser
        Returns:
        Max value
      • 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,​Integer>
        Returns:
        true if the parser is context free, else false