Interface ArgumentParser<C,​T>

    • Method Detail

      • suggestions

        default @NonNull List<@NonNull Stringsuggestions​(@NonNull CommandContext<C> commandContext,
                                                           @NonNull String input)
        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

        Parameters:
        commandContext - Command context
        input - Input string
        Returns:
        List of suggestions
      • isContextFree

        default boolean isContextFree()
        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
        Returns:
        true if the parser is context free, else false
      • getRequestedArgumentCount

        default int getRequestedArgumentCount()
        Get the amount of arguments that this parsers seeks to consume
        Returns:
        The number of arguments tha the parser expects
        Since:
        1.1.0