Package jline.console.completer
Interface Completer
-
- All Known Implementing Classes:
StringsCompleter
public interface CompleterA completer is the mechanism by which tab-completion candidates will be resolved.- Since:
- 2.3
- Author:
- Marc Prud'hommeaux, Jason Dillon
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcomplete(String buffer, int cursor, List<CharSequence> candidates)Populates candidates with a list of possible completions for the buffer.
-
-
-
Method Detail
-
complete
int complete(String buffer, int cursor, List<CharSequence> candidates)
Populates candidates with a list of possible completions for the buffer. The candidates list will not be sorted before being displayed to the user: thus, the complete method should sort theListbefore returning.- Parameters:
buffer- The buffercursor- The current position of the cursor in the buffercandidates- TheListof candidates to populate- Returns:
- The index of the buffer for which the completion will be relative
-
-