Top Description Fields Constructors Methods
jdk.internal.org.jline.reader.impl.completer

public Class AggregateCompleter

extends Object
implements Completer
Class Inheritance
All Implemented Interfaces
jdk.internal.org.jline.reader.Completer
Imports
java.util.Arrays, .Collection, .List, .Objects, jdk.internal.org.jline.reader.Candidate, .Completer, .LineReader, .ParsedLine

Completer which contains multiple completers and aggregates them together.
Author
Jason Dillon
Since
2.3

Field Summary

Modifier and TypeField and Description
private final Collection<Completer>

Constructor Summary

AccessConstructor and Description
public
AggregateCompleter(final Completer...
the completers
completers
)

Construct an AggregateCompleter with the given completers.

public
AggregateCompleter(Collection<Completer>
the completers
completers
)

Construct an AggregateCompleter with the given completers.

Method Summary

Modifier and TypeMethod and Description
public void
complete(LineReader
The line reader
reader
,
final ParsedLine
The parsed command line
line
,
final List<Candidate>
The List of candidates to populate
candidates
)

Implements jdk.internal.org.jline.reader.Completer.complete.

Perform a completion operation across all aggregated completers.
public Collection<Completer>

Returns:

the aggregated completers
getCompleters
()

Retrieve the collection of completers currently being aggregated.

public String

Returns:

a string representing the aggregated completers
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

completersback to summary
private final Collection<Completer> completers

Constructor Detail

AggregateCompleterback to summary
public AggregateCompleter(final Completer... completers)

Construct an AggregateCompleter with the given completers. The completers will be used in the order given.

Parameters
completers:Completer[]

the completers

AggregateCompleterback to summary
public AggregateCompleter(Collection<Completer> completers)

Construct an AggregateCompleter with the given completers. The completers will be used in the order given.

Parameters
completers:Collection<Completer>

the completers

Method Detail

completeback to summary
public void complete(LineReader reader, final ParsedLine line, final List<Candidate> candidates)

Implements jdk.internal.org.jline.reader.Completer.complete.

Perform a completion operation across all aggregated completers. The effect is similar to the following code:

completers.forEach(c -> c.complete(reader, line, candidates));
Parameters
reader:LineReader

Doc from jdk.internal.org.jline.reader.Completer.complete.

The line reader

line:ParsedLine

Doc from jdk.internal.org.jline.reader.Completer.complete.

The parsed command line

candidates:List<Candidate>

Doc from jdk.internal.org.jline.reader.Completer.complete.

The List of candidates to populate

See Also
Completer#complete(LineReader, ParsedLine, List)
getCompletersback to summary
public Collection<Completer> getCompleters()

Retrieve the collection of completers currently being aggregated.

Returns:Collection<Completer>

the aggregated completers

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representing the aggregated completers

Annotations
@Override