Package org.jline.reader.impl.completer
Class AggregateCompleter
- java.lang.Object
-
- org.jline.reader.impl.completer.AggregateCompleter
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<Completer>
completers
-
Constructor Summary
Constructors Constructor Description AggregateCompleter(java.util.Collection<Completer> completers)
Construct an AggregateCompleter with the given completers.AggregateCompleter(Completer... completers)
Construct an AggregateCompleter with the given completers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(LineReader reader, ParsedLine line, java.util.List<Candidate> candidates)
Perform a completion operation across all aggregated completers.java.util.Collection<Completer>
getCompleters()
Retrieve the collection of completers currently being aggregated.java.lang.String
toString()
-
-
-
Field Detail
-
completers
private final java.util.Collection<Completer> completers
-
-
Constructor Detail
-
AggregateCompleter
public AggregateCompleter(Completer... completers)
Construct an AggregateCompleter with the given completers. The completers will be used in the order given.- Parameters:
completers
- the completers
-
AggregateCompleter
public AggregateCompleter(java.util.Collection<Completer> completers)
Construct an AggregateCompleter with the given completers. The completers will be used in the order given.- Parameters:
completers
- the completers
-
-
Method Detail
-
getCompleters
public java.util.Collection<Completer> getCompleters()
Retrieve the collection of completers currently being aggregated.- Returns:
- the aggregated completers
-
complete
public void complete(LineReader reader, ParsedLine line, java.util.List<Candidate> candidates)
Perform a completion operation across all aggregated completers. The effect is similar to the following code:completers.forEach(c -> c.complete(reader, line, candidates));
- Specified by:
complete
in interfaceCompleter
- Parameters:
reader
- The line readerline
- The parsed command linecandidates
- TheList
of candidates to populate- See Also:
Completer.complete(LineReader, ParsedLine, List)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representing the aggregated completers
-
-