程序包 jline
类 SimpleCompletor
java.lang.Object
jline.SimpleCompletor
- 直接已知子类:
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" }));
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static interface
Filter for elements in the completor. -
构造器概要
构造器构造器说明Complete 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) -
方法概要
修饰符和类型方法说明void
addCandidateString
(String candidateString) clone()
int
Populates candidates with a list of possible completions for the buffer.void
setCandidates
(SortedSet candidates) void
setCandidateStrings
(String[] strings) void
setDelimiter
(String delimiter)
-
构造器详细资料
-
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.- 抛出:
IOException
-
SimpleCompletor
Complete candidates using the whitespearated values in read from the specified Reader.- 抛出:
IOException
-
-
方法详细资料
-
complete
从接口复制的说明:Completor
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. -
setDelimiter
-
getDelimiter
-
setCandidates
-
getCandidates
-
setCandidateStrings
-
addCandidateString
-
clone
- 覆盖:
clone
在类中Object
- 抛出:
CloneNotSupportedException
-