public final class Completion extends Object implements Iterable<Map.Entry<String,Boolean>>, Serializable
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
Modifier and Type | Class and Description |
---|---|
static class |
Completion.Builder |
Modifier and Type | Field and Description |
---|---|
private static Completion |
EMPTY
.
|
private String |
prefix
.
|
private Map<String,Boolean> |
values
.
|
Modifier | Constructor and Description |
---|---|
private |
Completion(String prefix,
Map<String,Boolean> values) |
Modifier and Type | Method and Description |
---|---|
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() |
private static final Completion EMPTY
private Completion(String prefix, Map<String,Boolean> values)
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 boolean isEmpty()
public int getSize()
Copyright © 2015 eXo Platform SAS. All Rights Reserved.