Class EnumArgument.EnumParser<C,​E extends Enum<E>>

    • Constructor Detail

      • EnumParser

        public EnumParser​(@NonNull Class<E> enumClass)
        Construct a new enum parser
        enumClass - Enum class
    • Method Detail

      • 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,​E extends Enum<E>>
        commandContext - Command context
        input - Input string
        List of suggestions
      • 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,​E extends Enum<E>>
        true if the parser is context free, else false