Interface BlockingSuggestionProvider.Strings<C>
- Type Parameters:
C- command sender type
- All Superinterfaces:
BlockingSuggestionProvider<C>,SuggestionProvider<C>
- All Known Implementing Classes:
BooleanParser,ByteParser,DurationParser,EnumParser,IntegerParser,LiteralParser,LongParser,ShortParser
- Enclosing interface:
BlockingSuggestionProvider<C>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
BlockingSuggestionProvider that has String results
instead of Suggestion results.
The provided default implementation of suggestions(CommandContext, CommandInput)
maps the String results to suggestions using Suggestion.suggestion(String).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.incendo.cloud.suggestion.BlockingSuggestionProvider
BlockingSuggestionProvider.Strings<C> -
Method Summary
Modifier and TypeMethodDescriptionstringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) Returns the suggestions for the giveninput.default @NonNull Iterable<@NonNull Suggestion> suggestions(@NonNull CommandContext<C> context, @NonNull CommandInput input) Returns the suggestions for the giveninput.Methods inherited from interface org.incendo.cloud.suggestion.BlockingSuggestionProvider
suggestionsFuture
-
Method Details
-
stringSuggestions
@NonNull Iterable<@NonNull String> stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) Returns the suggestions for the giveninput.The
inputparameter contains all sender-provided input that has not yet been consumed by the argument parsers. If the component that the suggestion provider is generating suggestions for consumes multiple tokens the suggestion provider might receive aCommandInputinstance containing multiple tokens.CommandInput.lastRemainingToken()may be used to extract the part of the command that is currently being completed by the command sender.- Parameters:
commandContext- Command contextinput- Input string- Returns:
- List of suggestions
-
suggestions
default @NonNull Iterable<@NonNull Suggestion> suggestions(@NonNull CommandContext<C> context, @NonNull CommandInput input) Description copied from interface:BlockingSuggestionProviderReturns the suggestions for the giveninput.The
inputparameter contains all sender-provided input that has not yet been consumed by the argument parsers. If the component that the suggestion provider is generating suggestions for consumes multiple tokens the suggestion provider might receive aCommandInputinstance containing multiple tokens.CommandInput.lastRemainingToken()may be used to extract the part of the command that is currently being completed by the command sender.- Specified by:
suggestionsin interfaceBlockingSuggestionProvider<C>- Parameters:
context- the context of the suggestion lookupinput- the current input- Returns:
- the suggestions
-