Class ShortArgument.ShortParser<C>

    • Constructor Detail

      • ShortParser

        public ShortParser​(short min,
                           short max)
        Construct a new short parser
        min - Minimum value
        max - Maximum value
    • Method Detail

      • 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,​Short>
        true if the parser is context free, else false
      • suggestions

        public @NonNull List<@NonNull Stringsuggestions​(@NonNull CommandContext<C> commandContext,
                                                          @NonNull String input)
        Description copied from interface: ArgumentParser
        Get a list of suggested arguments that would be correctly parsed by this parser

        This method is likely to be called for every character provided by the sender and so it may be necessary to cache results locally to prevent unnecessary computations

        Specified by:
        suggestions in interface ArgumentParser<C,​Short>
        commandContext - Command context
        input - Input string
        List of suggestions
      • getMax

        public short getMax()
        Get the max value
        Max value
      • getMin

        public short getMin()
        Get the min value
        Min value