Class ByteArgument.ByteParser<C>

    • Constructor Detail

      • ByteParser

        public ByteParser​(byte min,
                          byte max)
        Construct a new byte parser
        Parameters:
        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,​Byte>
        Returns:
        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,​Byte>
        Parameters:
        commandContext - Command context
        input - Input string
        Returns:
        List of suggestions
      • getMax

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

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