jline

Class MultiCompletor

Implemented Interfaces:
Completor

public class MultiCompletor
extends java.lang.Object
implements Completor

A completor that contains multiple embedded completors. This differs from the ArgumentCompletor, in that the nested completors are dispatched individually, rather than delimited by arguments.
Author:
Marc Prud'hommeaux

Constructor Summary

MultiCompletor()
Construct a MultiCompletor with no embedded completors.
MultiCompletor(List completors)
Construct a MultiCompletor with the specified list of Completor instances.
MultiCompletor(Completor[] completors)
Construct a MultiCompletor with the specified Completor instances.

Method Summary

int
complete(String buffer, int pos, List cand)
Populates candidates with a list of possible completions for the buffer.
Completor[]
getCompletors()
void
setCompletors(Completor[] completors)

Constructor Details

MultiCompletor

public MultiCompletor()
Construct a MultiCompletor with no embedded completors.

MultiCompletor

public MultiCompletor(List completors)

MultiCompletor

public MultiCompletor(Completor[] completors)
Construct a MultiCompletor with the specified Completor instances.

Method Details

complete

public int complete(String buffer,
                    int pos,
                    List cand)
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 Completor
Parameters:
buffer - the buffer
Returns:
the index of the buffer for which the completion will be relative

getCompletors

public Completor[] getCompletors()

setCompletors

public void setCompletors(Completor[] completors)