Class AnsiStringsCompleter

java.lang.Object
jline.console.completer.AnsiStringsCompleter
All Implemented Interfaces:
Completer

public class AnsiStringsCompleter extends Object implements Completer
Completer for a set of strings.
Since:
2.3
Author:
Jason Dillon
  • Constructor Details

    • AnsiStringsCompleter

      public AnsiStringsCompleter()
    • AnsiStringsCompleter

      public AnsiStringsCompleter(Collection<String> strings)
    • AnsiStringsCompleter

      public AnsiStringsCompleter(String... strings)
  • Method Details

    • getStrings

      public Collection<String> getStrings()
    • complete

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