Package net.mtrop.doom.struct.trie
Class CaseInsensitiveTrieMap<V>
java.lang.Object
net.mtrop.doom.struct.trie.AbstractTrie<Map.Entry<K,V>,S>
net.mtrop.doom.struct.trie.AbstractTrieMap<String,V,Character>
net.mtrop.doom.struct.trie.StringTrieMap<V>
net.mtrop.doom.struct.trie.CaseInsensitiveTrieMap<V>
- Type Parameters:
V
- the value type.
An implementation of a Trie that stores strings, case-insensitively.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested classes/interfaces inherited from class net.mtrop.doom.struct.trie.AbstractTrie
AbstractTrie.Node<V,
S>, AbstractTrie.Result<V, S>, AbstractTrie.TrieIterator<V, S> -
Field Summary
Fields inherited from class net.mtrop.doom.struct.trie.AbstractTrie
root
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equalityMethodForKey
(String object1, String object2) Determines if two keys are equal.protected Character[]
getSegmentsForKey
(String value) Creates the segments necessary to find/store values with keys.Methods inherited from class net.mtrop.doom.struct.trie.AbstractTrieMap
containsKey, equalityMethod, get, getAfterKey, getAfterKey, getBeforeKey, getBeforeKey, getKeysAfterKey, getKeysAfterKey, getKeysBeforeKey, getKeysBeforeKey, getKeyWithRemainderByKey, getKeyWithRemainderByKey, getSegments, getWithRemainderByKey, getWithRemainderByKey, put, removeEntry, searchByKey, toArrayKeys, toArrayValues
Methods inherited from class net.mtrop.doom.struct.trie.AbstractTrie
add, clear, contains, getAfter, getAfter, getBefore, getBefore, getWithRemainder, getWithRemainder, isEmpty, iterator, remove, search, size, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CaseInsensitiveTrieMap
public CaseInsensitiveTrieMap()
-
-
Method Details
-
getSegmentsForKey
Description copied from class:AbstractTrieMap
Creates the segments necessary to find/store values with keys. This should always create the same segments for the same key.- Overrides:
getSegmentsForKey
in classStringTrieMap<V>
- Parameters:
value
- the key to generate significant segments for.- Returns:
- the list of segments for the key.
-
equalityMethodForKey
Description copied from class:AbstractTrieMap
Determines if two keys are equal. This can be implemented differently in case a map has a different concept of what keys are considered equal.- Overrides:
equalityMethodForKey
in classAbstractTrieMap<String,
V, Character> - Parameters:
object1
- the first key.object2
- the second key.- Returns:
- true if the keys are considered equal, false otherwise.
-