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 TypeMethodDescriptionvoid
addSuggestion
(@NonNull Suggestion suggestion) Adds the givensuggestion
to the stored suggestionsvoid
addSuggestions
(@NonNull Iterable<? extends @NonNull Suggestion> suggestions) Adds all the givensuggestions
to the stored suggestionsReturns the command contextCreateSuggestions
from 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
CreateSuggestions
from the current context.- Returns:
- suggestions
-
commandContext
Returns the command context- Returns:
- command context
-
addSuggestions
Adds all the givensuggestions
to the stored suggestions- Parameters:
suggestions
- the suggestions to add
-
addSuggestion
Adds the givensuggestion
to the stored suggestions- Parameters:
suggestion
- the suggestion to add
-