Class IntegerArgument.IntegerParser<C>

    • Constructor Detail

      • IntegerParser

        public IntegerParser​(int min,
                             int max)
        Construct a new integer parser
        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
        min - Minimum value
        max - Maximum value
        input - Input
        List of suggestions
      • getMin

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

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