public class HashTrie<T> extends Object implements Trie<T>
Trie.TrieProxy<T>, Trie.Unmodifiable<T>, Trie.Util| 构造器和说明 |
|---|
HashTrie() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear all entries.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<CharSequence,T>> |
entrySet() |
boolean |
equals(Object other) |
T |
get(Object key)
Get the value for a key.
|
Map.Entry<CharSequence,T> |
getLongestMatch(CharSequence key)
Get the key value entry who's key is the longest prefix match.
|
Map.Entry<CharSequence,T> |
getLongestMatch(PushbackReader keyIn)
Get the key value entry who's key is the longest prefix match.
|
int |
getMaxKeyLength()
Get the maximum key length.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<CharSequence> |
keySet() |
T |
put(CharSequence key,
T value)
Add mapping.
|
void |
putAll(Map<? extends CharSequence,? extends T> map) |
T |
remove(Object key)
Remove a entry.
|
int |
size()
Get the number of entries.
|
String |
toString() |
Collection<T> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Map.Entry<CharSequence,T> getLongestMatch(CharSequence key)
getLongestMatch 在接口中 Trie<T>key - The key to lookuppublic Map.Entry<CharSequence,T> getLongestMatch(PushbackReader keyIn) throws IOException
getLongestMatch 在接口中 Trie<T>keyIn - Pushback reader to read the key from. This should have a buffer
at least as large as getMaxKeyLength() or an
IOException may be thrown backing up.IOException - if keyIn.read() or keyIn.unread() does.public int getMaxKeyLength()
getMaxKeyLength 在接口中 Trie<T>public void clear()
clear 在接口中 Map<CharSequence,T>public boolean containsKey(Object key)
containsKey 在接口中 Map<CharSequence,T>public boolean containsValue(Object value)
containsValue 在接口中 Map<CharSequence,T>public T put(CharSequence key, T value) throws NullPointerException
put 在接口中 Map<CharSequence,T>key - The mapping's key.NullPointerException - if key or value is null.public T remove(Object key) throws UnsupportedOperationException
remove 在接口中 Map<CharSequence,T>UnsupportedOperationException - always.public void putAll(Map<? extends CharSequence,? extends T> map)
putAll 在接口中 Map<CharSequence,T>public Set<CharSequence> keySet()
keySet 在接口中 Map<CharSequence,T>public Collection<T> values()
values 在接口中 Map<CharSequence,T>public Set<Map.Entry<CharSequence,T>> entrySet()
entrySet 在接口中 Map<CharSequence,T>public T get(Object key)
get 在接口中 Map<CharSequence,T>key - The key to look up.public int size()
size 在接口中 Map<CharSequence,T>public boolean equals(Object other)
public boolean isEmpty()
isEmpty 在接口中 Map<CharSequence,T>Copyright © 2024. All rights reserved.