Comparable<Candidate>
public class Candidate extends Object implements Comparable<Candidate>
Constructor | Description |
---|---|
Candidate(String value) |
Simple constructor with only a single String as an argument.
|
Candidate(String value,
String displ,
String group,
String descr,
String suffix,
String key,
boolean complete) |
Constructs a new Candidate.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(Candidate o) |
|
boolean |
complete() |
Boolean indicating whether this candidate is complete or
if the completer may further expand the candidate value
after this candidate has been selected.
|
String |
descr() |
Description of this candidate, usually a small help message
to understand the meaning of this candidate.
|
String |
displ() |
The string that will be displayed to the user.
|
String |
group() |
The group name for this candidate.
|
String |
key() |
Candidates which have the same key will be merged together.
|
String |
suffix() |
The suffix is added when this candidate is displayed.
|
String |
value() |
The value that will be used for the actual completion.
|
public Candidate(String value)
value
- the candidatepublic Candidate(String value, String displ, String group, String descr, String suffix, String key, boolean complete)
value
- the valuedispl
- the display stringgroup
- the groupdescr
- the descriptionsuffix
- the suffixkey
- the keycomplete
- the complete flagpublic String value()
public String displ()
public String group()
LineReader.Option.GROUP
,
LineReader.Option.AUTO_GROUP
public String descr()
public String suffix()
LineReader.Option.AUTO_REMOVE_SLASH
,
LineReader.REMOVE_SUFFIX_CHARS
public String key()
public boolean complete()
public int compareTo(Candidate o)
compareTo
in interface Comparable<Candidate>
Copyright © 2020. All rights reserved.