Class PatriciaTrie<V>
- Type Parameters:
- V- the type of the values in this map
- All Implemented Interfaces:
- Serializable,- Map<String,,- V> - SortedMap<String,,- V> - Get<String,,- V> - IterableGet<String,,- V> - IterableMap<String,,- V> - IterableSortedMap<String,,- V> - OrderedMap<String,,- V> - Put<String,,- V> - Trie<String,- V> 
 A PATRICIA Trie is a compressed
 Trie. Instead of storing
 all data at the edges of the Trie
 (and having empty internal nodes), PATRICIA stores data in every node.
 This allows for very efficient traversal, insert, delete, predecessor,
 successor, prefix, range, and AbstractPatriciaTrie.select(Object)
 operations. All operations are performed at worst in O(K) time, where K
 is the number of bits in the largest item in the tree. In practice,
 operations actually take O(A(K)) time, where A(K) is the average number of
 bits of all items in the tree.
 
Most importantly, PATRICIA requires very few comparisons to keys while doing any operation. While performing a lookup, each comparison (at most K of them, described above) will perform a single bit comparison against the given key, instead of comparing the entire key to another key.
 The Trie can return operations in
 lexicographical order using the 'prefixMap', 'submap', or 'iterator' methods.
 The Trie can also
 scan for items that are 'bitwise' (using an XOR metric) by the 'select' method.
 Bitwise closeness is determined by the KeyAnalyzer returning true or
 false for a bit being set or not in a given key.
 
 This PATRICIA Trie supports both variable
 length & fixed length keys. Some methods, such as Trie.prefixMap(Object)
 are suited only to variable length keys.
 
- Since:
- 4.0
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.collections4.trie.AbstractPatriciaTrieAbstractPatriciaTrie.TrieEntry<K,V> Nested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Field SummaryFields inherited from class org.apache.commons.collections4.trie.AbstractPatriciaTriemodCount
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new instance.PatriciaTrie(Map<? extends String, ? extends V> map) Constructs a new instance.
- 
Method SummaryMethods inherited from class org.apache.commons.collections4.trie.AbstractPatriciaTrieclear, comparator, containsKey, entrySet, firstKey, get, headMap, keySet, lastKey, mapIterator, nextKey, prefixMap, previousKey, put, remove, select, selectKey, selectValue, size, subMap, tailMap, valuesMethods inherited from class org.apache.commons.collections4.trie.AbstractBitwiseTriegetKeyAnalyzer, toStringMethods inherited from class java.util.AbstractMapclone, containsValue, equals, hashCode, isEmpty, putAllMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.collections4.GetcontainsValue, isEmptyMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
PatriciaTriepublic PatriciaTrie()Constructs a new instance.
- 
PatriciaTrieConstructs a new instance.- Parameters:
- map- mappings to be stored in this map.
 
 
-