|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.cli.spi.Completion
public final class Completion
An immutable object representing the complation of a value. A completion is described by:
Map.Entry<String, Boolean>
map where the key is string value of the completion
and the boolean value tells whether the value is a suffix (i.e it ends the value) or not (i.e it can be further
more completed).The following guidelines should be respected:
Example: a completer that would complete colors could
Example: a completer that would complete java packages could
Nested Class Summary | |
---|---|
static class |
Completion.Builder
|
Field Summary | |
---|---|
private static Completion |
EMPTY
. |
private String |
prefix
. |
private Map<String,Boolean> |
values
. |
Constructor Summary | |
---|---|
private |
Completion(String prefix,
Map<String,Boolean> values)
|
Method Summary | |
---|---|
static Completion.Builder |
builder(String prefix)
|
static Completion |
create()
|
static Completion |
create(String prefix)
|
static Completion |
create(String suffix,
boolean value)
|
static Completion |
create(String prefix,
Map<String,Boolean> suffixes)
|
static Completion |
create(String prefix,
String suffix,
boolean value)
|
boolean |
equals(Object obj)
|
Boolean |
get(String key)
|
String |
getPrefix()
|
int |
getSize()
|
Set<String> |
getValues()
|
int |
hashCode()
|
boolean |
isEmpty()
|
Iterator<Map.Entry<String,Boolean>> |
iterator()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Completion EMPTY
private final String prefix
private final Map<String,Boolean> values
Constructor Detail |
---|
private Completion(String prefix, Map<String,Boolean> values)
Method Detail |
---|
public static Completion.Builder builder(String prefix)
public static Completion create()
public static Completion create(String prefix)
public static Completion create(String prefix, String suffix, boolean value)
public static Completion create(String suffix, boolean value)
public static Completion create(String prefix, Map<String,Boolean> suffixes)
public Iterator<Map.Entry<String,Boolean>> iterator()
iterator
in interface Iterable<Map.Entry<String,Boolean>>
public Set<String> getValues()
public boolean isEmpty()
public Boolean get(String key)
public int getSize()
public String getPrefix()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |