Package org.incendo.cloud.internal
Class SuggestionContext<C,S extends Suggestion>
java.lang.Object
org.incendo.cloud.internal.SuggestionContext<C,S>
-
Constructor Summary
ConstructorsConstructorDescriptionSuggestionContext(@NonNull SuggestionProcessor<C> processor, @NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput, @NonNull SuggestionMapper<S> mapper) Creates a new suggestion context -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSuggestion(@NonNull Suggestion suggestion) Adds the givensuggestionto the stored suggestionsvoidaddSuggestions(@NonNull Iterable<? extends @NonNull Suggestion> suggestions) Adds all the givensuggestionsto the stored suggestionsReturns the command contextCreateSuggestionsfrom the current context.
-
Constructor Details
-
SuggestionContext
public SuggestionContext(@NonNull SuggestionProcessor<C> processor, @NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput, @NonNull SuggestionMapper<S> mapper) Creates a new suggestion context- Parameters:
processor- the suggestion processorcommandContext- the command contextcommandInput- the command inputmapper- the suggestion mapper
-
-
Method Details
-
makeSuggestions
CreateSuggestionsfrom the current context.- Returns:
- suggestions
-
commandContext
Returns the command context- Returns:
- command context
-
addSuggestions
Adds all the givensuggestionsto the stored suggestions- Parameters:
suggestions- the suggestions to add
-
addSuggestion
Adds the givensuggestionto the stored suggestions- Parameters:
suggestion- the suggestion to add
-