Package jline.console.completer
Class StringsCompleter
- java.lang.Object
-
- jline.console.completer.StringsCompleter
-
- All Implemented Interfaces:
Completer
- Direct Known Subclasses:
EnumCompleter
public class StringsCompleter extends java.lang.Object implements Completer
Completer for a set of strings.- Since:
- 2.3
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.SortedSet<java.lang.String>
strings
-
Constructor Summary
Constructors Constructor Description StringsCompleter()
StringsCompleter(java.lang.String... strings)
StringsCompleter(java.util.Collection<java.lang.String> strings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
complete(java.lang.String buffer, int cursor, java.util.List<java.lang.CharSequence> candidates)
Populates candidates with a list of possible completions for the buffer.java.util.Collection<java.lang.String>
getStrings()
-
-
-
Method Detail
-
getStrings
public java.util.Collection<java.lang.String> getStrings()
-
complete
public int complete(java.lang.String buffer, int cursor, java.util.List<java.lang.CharSequence> candidates)
Description copied from interface:Completer
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 theList
before returning.
-
-