jline.console.completer
Class AggregateCompleter

java.lang.Object
  extended by 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

Constructor Summary
AggregateCompleter()
           
AggregateCompleter(java.util.Collection<Completer> completers)
           
AggregateCompleter(Completer... completers)
           
 
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
 

Constructor Detail

AggregateCompleter

public AggregateCompleter()

AggregateCompleter

public AggregateCompleter(java.util.Collection<Completer> completers)

AggregateCompleter

public AggregateCompleter(Completer... completers)
Method Detail

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 buffer
cursor - The current position of the cursor in the buffer
candidates - 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


Copyright © 2008-2011 Sonatype. All Rights Reserved.