Package jline.console.completer
Class StringsCompleter
- java.lang.Object
-
- jline.console.completer.StringsCompleter
-
- All Implemented Interfaces:
Completer
public class StringsCompleter extends Object implements Completer
Completer for a set of strings.- Since:
- 2.3
- Author:
- Jason Dillon
-
-
Constructor Summary
Constructors Constructor Description StringsCompleter()StringsCompleter(String... strings)StringsCompleter(Collection<String> strings)
-
Method Summary
All Methods Instance Methods Concrete 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.Collection<String>getStrings()
-
-
-
Constructor Detail
-
StringsCompleter
public StringsCompleter()
-
StringsCompleter
public StringsCompleter(Collection<String> strings)
-
StringsCompleter
public StringsCompleter(String... strings)
-
-
Method Detail
-
getStrings
public Collection<String> getStrings()
-
complete
public int complete(String buffer, int cursor, List<CharSequence> candidates)
Description copied from interface:CompleterPopulates 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.
-
-