|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.tomshut.util.LatinTrie<T>
public class LatinTrie<T>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
LatinTrie()
|
Method Summary | |
---|---|
void |
clear()
Removes all of the nodes from this trie. |
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a node for the specified key. |
boolean |
containsValue(java.lang.Object value)
Returns true if this trie contains one or more nodes with the specified value. |
java.util.Set<java.util.Map.Entry<java.lang.CharSequence,T>> |
entrySet()
Returns a Set view of the nodes contained in this trie. |
T |
get(java.lang.Object key)
Returns the value to which the specified key is associated, or null if this trie does not contain the key. |
LatinTrieNode<T> |
getBestLatinTrieNode(java.lang.Object key)
Traverse the Trie and get the Trie node which may have our key. |
int |
getNodeEstimate()
Returns the estimated number of nodes in the trie |
LatinTrieNode<T> |
getRoot()
Returns the root node of the trie |
boolean |
isEmpty()
Returns true if this trie contains no keys. |
boolean |
isMutable()
Check if the trie is mutable |
java.util.Set<java.lang.CharSequence> |
keySet()
Returns a Set view of the keys contained in this map. |
T |
put(java.lang.CharSequence key,
T value)
Associates the specified value with the specified key in this trie. |
void |
putAll(java.util.Map<? extends java.lang.CharSequence,? extends T> map)
Copies all of the mappings from the specified map to this trie. |
T |
remove(java.lang.Object key)
Removes the specified key and the value associated to it from this trie if present. |
int |
size()
Returns the number of nodes with keys in this trie. |
java.util.Collection<T> |
values()
Returns a Collection view of the values contained in this trie. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public LatinTrie()
Method Detail |
---|
public final void clear()
clear
in interface java.util.Map<java.lang.CharSequence,T>
public final boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.CharSequence,T>
key
- The key whose presence in this trie is to be tested
public final boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.CharSequence,T>
value
- value whose presence in this trie is to be tested
public final java.util.Set<java.util.Map.Entry<java.lang.CharSequence,T>> entrySet()
entrySet
in interface java.util.Map<java.lang.CharSequence,T>
public final T get(java.lang.Object key)
If the given key is null, it returns null.
A return value of null does not necessarily indicate that the trie does not contain the key; it's also possible that the trie explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
get
in interface java.util.Map<java.lang.CharSequence,T>
key
- the key whose associated value is to be returned
public final boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.CharSequence,T>
public final java.util.Set<java.lang.CharSequence> keySet()
keySet
in interface java.util.Map<java.lang.CharSequence,T>
public final T put(java.lang.CharSequence key, T value)
put
in interface java.util.Map<java.lang.CharSequence,T>
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key
public final void putAll(java.util.Map<? extends java.lang.CharSequence,? extends T> map)
putAll
in interface java.util.Map<java.lang.CharSequence,T>
map
- mappings to be stored in this triepublic final T remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.CharSequence,T>
key
- the key of the object to remove
public final int size()
size
in interface java.util.Map<java.lang.CharSequence,T>
public final int getNodeEstimate()
public final java.util.Collection<T> values()
values
in interface java.util.Map<java.lang.CharSequence,T>
public LatinTrieNode<T> getRoot()
public boolean isMutable()
public final LatinTrieNode<T> getBestLatinTrieNode(java.lang.Object key)
key
- the key to look for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |