K - Key of the elements of the trieV - The valuepublic class TrieMap<K,V> extends AbstractMap<Iterable<K>,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected Map<K,TrieMap<K,V>> |
children
Child tries
|
protected V |
value
Value at a leaf node (leaf node is indicated by non-null value)
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<Iterable<K>,V>> |
entrySet() |
V |
get(Iterable<K> key) |
V |
get(K[] key) |
V |
get(Object key) |
Map<K,TrieMap<K,V>> |
getChildren() |
TrieMap<K,V> |
getChildTrie(Iterable<K> key) |
TrieMap<K,V> |
getChildTrie(K key) |
V |
getValue() |
boolean |
isEmpty() |
boolean |
isLeaf() |
Set<Iterable<K>> |
keySet() |
V |
put(Iterable<K> key,
V value) |
V |
put(K[] key,
V value) |
void |
putAll(Map<? extends Iterable<K>,? extends V> m) |
TrieMap<K,V> |
putChildTrie(Iterable<K> key,
TrieMap<K,V> child) |
V |
remove(Iterable key) |
V |
remove(K[] key) |
V |
remove(Object key) |
int |
size() |
String |
toFormattedString() |
protected void |
updateEntries(Set<Map.Entry<Iterable<K>,V>> entries,
List<K> prefix) |
protected void |
updateKeys(Set<Iterable<K>> keys,
List<K> prefix) |
protected void |
updateTrieStrings(List<String> strings,
String prefix) |
protected void |
updateValues(List<V> values) |
Collection<V> |
values() |
clone, equals, hashCode, toStringprotected V value
public V getValue()
public boolean isLeaf()
public String toFormattedString()
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey in interface Map<Iterable<K>,V>containsKey in class AbstractMap<Iterable<K>,V>public boolean containsValue(Object value)
containsValue in interface Map<Iterable<K>,V>containsValue in class AbstractMap<Iterable<K>,V>public void clear()
public Collection<V> values()