Class SimpleCompletor
java.lang.Object
jline.SimpleCompletor
- Direct Known Subclasses:
ClassNameCompletor
A simple Completor implementation that handles a pre-defined
list of completion words.
Example usage:
myConsoleReader.addCompletor (new SimpleCompletor (new String [] { "now", "yesterday", "tomorrow" }));
- Author:
- Marc Prud'hommeaux
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceFilter for elements in the completor. -
Constructor Summary
ConstructorsConstructorDescriptionComplete candidates using the whitespearated values in read from the specified Reader.SimpleCompletor(Reader reader) Complete candidates using the contents of the specified Reader.SimpleCompletor(String candidateString) Create a new SimpleCompletor with a single possible completion values.SimpleCompletor(String[] candidateStrings) Create a new SimpleCompletor with a list of possible completion values.SimpleCompletor(String[] strings, SimpleCompletor.SimpleCompletorFilter filter) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCandidateString(String candidateString) clone()intPopulates candidates with a list of possible completions for the buffer.voidsetCandidates(SortedSet candidates) voidsetCandidateStrings(String[] strings) voidsetDelimiter(String delimiter)
-
Constructor Details
-
SimpleCompletor
Create a new SimpleCompletor with a single possible completion values. -
SimpleCompletor
Create a new SimpleCompletor with a list of possible completion values. -
SimpleCompletor
-
SimpleCompletor
Complete candidates using the contents of the specified Reader.- Throws:
IOException
-
SimpleCompletor
Complete candidates using the whitespearated values in read from the specified Reader.- Throws:
IOException
-
-
Method Details
-
complete
-
setDelimiter
-
getDelimiter
-
setCandidates
-
getCandidates
-
setCandidateStrings
-
addCandidateString
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-