jline.console.completer
Interface Completer

All Known Implementing Classes:
AggregateCompleter, ArgumentCompleter, EnumCompleter, FileNameCompleter, NullCompleter, StringsCompleter

public interface Completer

A completer is the mechanism by which tab-completion candidates will be resolved.

Since:
2.3
Author:
Marc Prud'hommeaux, Jason Dillon

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.
 

Method Detail

complete

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. The candidates list will not be sorted before being displayed to the user: thus, the complete method should sort the List before returning.

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


Copyright © 2008-2011 Sonatype. All Rights Reserved.