jline.console.completer
Class AggregateCompleter
java.lang.Object
jline.console.completer.AggregateCompleter
- All Implemented Interfaces:
- Completer
public class AggregateCompleter
- extends java.lang.Object
- implements Completer
Completer which contains multiple completers and aggregates them together.
- Since:
- 2.3
- Author:
- Jason Dillon
Method Summary |
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<Completer> |
getCompleters()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AggregateCompleter
public AggregateCompleter()
AggregateCompleter
public AggregateCompleter(java.util.Collection<Completer> completers)
AggregateCompleter
public AggregateCompleter(Completer... completers)
getCompleters
public java.util.Collection<Completer> getCompleters()
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 the
List
before returning.
- Specified by:
complete
in interface Completer
- Parameters:
buffer
- The buffercursor
- The current position of the cursor in the buffercandidates
- The List
of candidates to populate
- Returns:
- The index of the buffer for which the completion will be relative
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object