APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.org.jline.reader.impl.completer

public Class StringsCompleter

extends Object
implements Completer
Class Inheritance
All Implemented Interfaces
jdk.internal.org.jline.reader.Completer
Known Direct Subclasses
jdk.internal.org.jline.reader.impl.completer.EnumCompleter
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .List, java.util.function.Supplier, jdk.internal.org.jline.reader.Candidate, .Completer, .LineReader, .ParsedLine, jdk.internal.org.jline.utils.AttributedString

Completer for a set of strings.
Author
Jason Dillon
Since
2.3

Field Summary

Modifier and TypeField and Description
protected Collection<Candidate>
protected Supplier<Collection<String>>

Constructor Summary

AccessConstructor and Description
public
public
public
public
public
StringsCompleter(Candidate... candidates)

public

Method Summary

Modifier and TypeMethod and Description
public void
complete(LineReader reader, final ParsedLine commandLine, final List<Candidate> candidates)

Implements jdk.internal.org.jline.reader.Completer.complete.

Populates candidates with a list of possible completions for the command line.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

candidatesback to summary
protected Collection<Candidate> candidates
stringsSupplierback to summary
protected Supplier<Collection<String>> stringsSupplier

Constructor Detail

StringsCompleterback to summary
public StringsCompleter()
StringsCompleterback to summary
public StringsCompleter(Supplier<Collection<String>> stringsSupplier)
StringsCompleterback to summary
public StringsCompleter(String... strings)
StringsCompleterback to summary
public StringsCompleter(Iterable<String> strings)
StringsCompleterback to summary
public StringsCompleter(Candidate... candidates)
StringsCompleterback to summary
public StringsCompleter(Collection<Candidate> candidates)

Method Detail

completeback to summary
public void complete(LineReader reader, final ParsedLine commandLine, final List<Candidate> candidates)

Implements jdk.internal.org.jline.reader.Completer.complete.

Doc from jdk.internal.org.jline.reader.Completer.complete.

Populates candidates with a list of possible completions for the command line. The list of candidates will be sorted and filtered by the LineReader, so that the list of candidates displayed to the user will usually be smaller than the list given by the completer. Thus it is not necessary for the completer to do any matching based on the current buffer. On the contrary, in order for the typo matcher to work, all possible candidates for the word being completed should be returned.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override