Package jline
Class MultiCompletor
- java.lang.Object
-
- jline.MultiCompletor
-
- All Implemented Interfaces:
Completor
public class MultiCompletor extends java.lang.Object implements Completor
A completor that contains multiple embedded completors. This differs from the
ArgumentCompletor
, in that the nested completors are dispatched individually, rather than delimited by arguments.- Author:
- Marc Prud'hommeaux
-
-
Constructor Summary
Constructors Constructor Description MultiCompletor()
Construct a MultiCompletor with no embedded completors.MultiCompletor(java.util.List completors)
Construct a MultiCompletor with the specified list ofCompletor
instances.MultiCompletor(Completor[] completors)
Construct a MultiCompletor with the specifiedCompletor
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
complete(java.lang.String buffer, int pos, java.util.List cand)
Populates candidates with a list of possible completions for the buffer.Completor[]
getCompletors()
void
setCompletors(Completor[] completors)
-
-
-
Constructor Detail
-
MultiCompletor
public MultiCompletor()
Construct a MultiCompletor with no embedded completors.
-
MultiCompletor
public MultiCompletor(java.util.List completors)
Construct a MultiCompletor with the specified list ofCompletor
instances.
-
-
Method Detail
-
complete
public int complete(java.lang.String buffer, int pos, java.util.List cand)
Description copied from interface: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.
-
setCompletors
public void setCompletors(Completor[] completors)
-
getCompletors
public Completor[] getCompletors()
-
-