-
- All Known Implementing Classes:
CompletionMatcherImpl
public interface CompletionMatcher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcompile(Map<LineReader.Option,Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName)Compiles completion matcher functionsCandidateexactMatch()StringgetCommonPrefix()List<Candidate>matches(List<Candidate> candidates)
-
-
-
Method Detail
-
compile
void compile(Map<LineReader.Option,Boolean> options, boolean prefix, CompletingParsedLine line, boolean caseInsensitive, int errors, String originalGroupName)
Compiles completion matcher functions- Parameters:
options- LineReader optionsprefix- invoked by complete-prefix or expand-or-complete-prefix widgetline- The parsed line within which completion has been requestedcaseInsensitive- if completion is case insensitive or noterrors- number of errors accepted in matchingoriginalGroupName- value of JLineReader variable original-group-name
-
matches
List<Candidate> matches(List<Candidate> candidates)
- Parameters:
candidates- list of candidates- Returns:
- a list of candidates that completion matcher matches
-
exactMatch
Candidate exactMatch()
- Returns:
- a candidate that have exact match, null if no exact match found
-
getCommonPrefix
String getCommonPrefix()
- Returns:
- a common prefix of matched candidates
-
-