|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Trie<K,V>
Defines the interface for a prefix tree, an ordered tree data structure. For more information, see Tries.
| Method Summary | |
|---|---|
SortedMap<K,V> |
prefixMap(K key)
Returns a view of this Trie of all elements that are prefixed
by the given key. |
| Methods inherited from interface java.util.SortedMap |
|---|
comparator, firstKey, headMap, lastKey, subMap, tailMap |
| Methods inherited from interface org.apache.commons.collections4.OrderedMap |
|---|
firstKey, lastKey, mapIterator, nextKey, previousKey |
| Methods inherited from interface org.apache.commons.collections4.Put |
|---|
clear, put, putAll |
| Methods inherited from interface org.apache.commons.collections4.Get |
|---|
containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, values |
| Method Detail |
|---|
SortedMap<K,V> prefixMap(K key)
Trie of all elements that are prefixed
by the given key.
In a Trie with fixed size keys, this is essentially a
Map.get(Object) operation.
For example, if the Trie contains 'Anna', 'Anael',
'Analu', 'Andreas', 'Andrea', 'Andres', and 'Anatole', then
a lookup of 'And' would return 'Andreas', 'Andrea', and 'Andres'.
key - the key used in the search
SortedMap view of this Trie with all elements whose
key is prefixed by the search key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||