Class StaticSuggestionsCompleter
java.lang.Object
com.ultikits.ultitools.commands.tabcomplete.StaticSuggestionsCompleter
- All Implemented Interfaces:
TabCompleter
Completer that provides static suggestions from a predefined list.
从预定义列表提供静态建议的补全器。
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- wisdomme
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionStaticSuggestionsCompleter(String... suggestions) Creates a completer with static suggestions (case-insensitive matching).StaticSuggestionsCompleter(List<String> suggestions) Creates a completer with static suggestions (case-insensitive matching).StaticSuggestionsCompleter(List<String> suggestions, boolean caseSensitive) Creates a completer with static suggestions. -
Method Summary
Modifier and TypeMethodDescriptioncomplete(TabCompletionContext context) Generates completion suggestions based on the given context.static StaticSuggestionsCompleterCreates a completer for boolean values.static StaticSuggestionsCompleterCreates a completer for common toggle values.
-
Field Details
-
suggestions
-
caseSensitive
private final boolean caseSensitive
-
-
Constructor Details
-
StaticSuggestionsCompleter
Creates a completer with static suggestions (case-insensitive matching). 使用静态建议创建补全器(不区分大小写匹配)。- Parameters:
suggestions- the suggestions to provide
-
StaticSuggestionsCompleter
Creates a completer with static suggestions (case-insensitive matching). 使用静态建议创建补全器(不区分大小写匹配)。- Parameters:
suggestions- the suggestions to provide
-
StaticSuggestionsCompleter
Creates a completer with static suggestions. 使用静态建议创建补全器。- Parameters:
suggestions- the suggestions to providecaseSensitive- whether matching should be case-sensitive
-
-
Method Details
-
complete
Description copied from interface:TabCompleterGenerates completion suggestions based on the given context. 根据给定的上下文生成补全建议。- Specified by:
completein interfaceTabCompleter- Parameters:
context- the tab completion context containing command state- Returns:
- list of suggestions, never null
-
forBoolean
Creates a completer for boolean values. 创建布尔值的补全器。- Returns:
- a completer suggesting "true" and "false"
-
forToggle
Creates a completer for common toggle values. 创建常用开关值的补全器。- Returns:
- a completer suggesting common toggle options
-