com.hankcs.hanlp.collection.dartsclone
类 DartMap<V>
java.lang.Object
com.hankcs.hanlp.collection.dartsclone.DoubleArray
com.hankcs.hanlp.collection.dartsclone.DartMap<V>
- 所有已实现的接口:
- ITrie<V>, Map<String,V>
public class DartMap<V>
- extends DoubleArray
- implements Map<String,V>, ITrie<V>
双数组trie树map,更省内存,原本希望代替DoubleArrayTrie,后来发现效率不够
- 作者:
- hankcs
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 com.hankcs.hanlp.collection.trie.ITrie 继承的方法 |
size |
DartMap
public DartMap(List<String> keyList,
V[] valueArray)
DartMap
public DartMap(TreeMap<String,V> map)
DartMap
public DartMap()
isEmpty
public boolean isEmpty()
- 指定者:
- 接口
Map<String,V> 中的 isEmpty
containsKey
public boolean containsKey(Object key)
- 指定者:
- 接口
Map<String,V> 中的 containsKey
containsKey
public boolean containsKey(String key)
- 是否包含key
- 指定者:
- 接口
ITrie<V> 中的 containsKey
- 参数:
key -
- 返回:
containsValue
public boolean containsValue(Object value)
- 指定者:
- 接口
Map<String,V> 中的 containsValue
get
public V get(Object key)
- 指定者:
- 接口
Map<String,V> 中的 get
build
public int build(TreeMap<String,V> keyValueMap)
- 指定者:
- 接口
ITrie<V> 中的 build
save
public boolean save(DataOutputStream out)
- 指定者:
- 接口
ITrie<V> 中的 save
load
public boolean load(ByteArray byteArray,
V[] value)
- 指定者:
- 接口
ITrie<V> 中的 load
get
public V get(char[] key)
- 指定者:
- 接口
ITrie<V> 中的 get
get
public V get(String key)
- 指定者:
- 接口
ITrie<V> 中的 get
getValueArray
public V[] getValueArray(V[] a)
- 指定者:
- 接口
ITrie<V> 中的 getValueArray
commonPrefixSearch
public ArrayList<Pair<String,V>> commonPrefixSearch(String key,
int offset,
int maxResults)
- 前缀查询
- 参数:
key - offset - maxResults -
- 返回:
commonPrefixSearch
public ArrayList<Pair<String,V>> commonPrefixSearch(String key)
put
public V put(String key,
V value)
- 指定者:
- 接口
Map<String,V> 中的 put
remove
public V remove(Object key)
- 指定者:
- 接口
Map<String,V> 中的 remove
putAll
public void putAll(Map<? extends String,? extends V> m)
- 指定者:
- 接口
Map<String,V> 中的 putAll
clear
public void clear()
- 指定者:
- 接口
Map<String,V> 中的 clear
keySet
public Set<String> keySet()
- 指定者:
- 接口
Map<String,V> 中的 keySet
values
public Collection<V> values()
- 指定者:
- 接口
Map<String,V> 中的 values
entrySet
public Set<Map.Entry<String,V>> entrySet()
- 指定者:
- 接口
Map<String,V> 中的 entrySet
Copyright © 2014–2015 鐮佸啘鍦�/a>. All rights reserved.