public class

AggregateCompleter

extends Object
implements Completer
java.lang.Object
   ↳ jline.console.completer.AggregateCompleter

Class Overview

Completer which contains multiple completers and aggregates them together.

Summary

Public Constructors
AggregateCompleter()
AggregateCompleter(Collection<Completer> completers)
Construct an AggregateCompleter with the given collection of completers.
AggregateCompleter(Completer... completers)
Construct an AggregateCompleter with the given completers.
Public Methods
int complete(String buffer, int cursor, List<CharSequence> candidates)
Perform a completion operation across all aggregated completers.
Collection<Completer> getCompleters()
Retrieve the collection of completers currently being aggregated.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface jline.console.completer.Completer

Public Constructors

public AggregateCompleter ()

public AggregateCompleter (Collection<Completer> completers)

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

Parameters
completers the collection of completers

public AggregateCompleter (Completer... completers)

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

Parameters
completers the completers

Public Methods

public int complete (String buffer, int cursor, List<CharSequence> candidates)

Perform a completion operation across all aggregated completers.

Parameters
buffer The buffer
cursor The current position of the cursor in the buffer
candidates The List of candidates to populate
Returns
  • the highest completion return value from all completers

public Collection<Completer> getCompleters ()

Retrieve the collection of completers currently being aggregated.

Returns
  • the aggregated completers

public String toString ()

Returns
  • a string representing the aggregated completers