public class

StringsCompleter

extends Object
implements Completer
java.lang.Object
   ↳ jline.console.completer.StringsCompleter
Known Direct Subclasses

Class Overview

Completer for a set of strings.

Summary

Public Constructors
StringsCompleter()
StringsCompleter(Collection<String> strings)
StringsCompleter(String... strings)
Public Methods
int complete(String buffer, int cursor, List<CharSequence> candidates)
Populates candidates with a list of possible completions for the buffer.
Collection<String> getStrings()
[Expand]
Inherited Methods
From class java.lang.Object
From interface jline.console.completer.Completer

Public Constructors

public StringsCompleter ()

public StringsCompleter (Collection<String> strings)

public StringsCompleter (String... strings)

Public Methods

public int complete (String buffer, int cursor, List<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

public Collection<String> getStrings ()