com.hankcs.hanlp.collection.MDAG
类 MDAGMap<V>
java.lang.Object
java.util.AbstractMap<String,V>
com.hankcs.hanlp.collection.MDAG.MDAGMap<V>
- 所有已实现的接口:
- Map<String,V>
public class MDAGMap<V>
- extends AbstractMap<String,V>
最好不要把MDAG当map用,现在的实现在key后面放一个int,导致右语言全部不同,退化为bintrie
- 作者:
- hankcs
从类 java.util.AbstractMap 继承的方法 |
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, putAll, remove, size, toString, values |
MDAGMap
public MDAGMap()
put
public V put(String key,
V value)
- 指定者:
- 接口
Map<String,V>
中的 put
- 覆盖:
- 类
AbstractMap<String,V>
中的 put
get
public V get(Object key)
- 指定者:
- 接口
Map<String,V>
中的 get
- 覆盖:
- 类
AbstractMap<String,V>
中的 get
get
public V get(String key)
entrySet
public Set<Map.Entry<String,V>> entrySet()
- 指定者:
- 接口
Map<String,V>
中的 entrySet
- 指定者:
- 类
AbstractMap<String,V>
中的 entrySet
keySet
public Set<String> keySet()
- 指定者:
- 接口
Map<String,V>
中的 keySet
- 覆盖:
- 类
AbstractMap<String,V>
中的 keySet
commonPrefixSearchWithValue
public LinkedList<Map.Entry<String,V>> commonPrefixSearchWithValue(char[] key,
int begin)
- 前缀查询
- 参数:
key
- begin
-
- 返回:
commonPrefixSearchWithValue
public LinkedList<Map.Entry<String,V>> commonPrefixSearchWithValue(String key)
- 前缀查询
- 参数:
key
-
- 返回:
simplify
public void simplify()
- 进一步降低内存,提高查询速度
副作用是下次插入速度会变慢
unSimplify
public void unSimplify()
Copyright © 2014–2015 码农场. All rights reserved.