com.hankcs.hanlp.collection.dartsclone
类 DartMap<V>

java.lang.Object
  继承者 com.hankcs.hanlp.collection.dartsclone.DoubleArray
      继承者 com.hankcs.hanlp.collection.dartsclone.DartMap<V>
所有已实现的接口:
Map<String,V>

public class DartMap<V>
extends DoubleArray
implements Map<String,V>

双数组trie树map,更省内存,原本希望代替DoubleArrayTrie,后来发现效率不够

作者:
hankcs

嵌套类摘要
 
从接口 java.util.Map 继承的嵌套类/接口
Map.Entry<K,V>
 
构造方法摘要
DartMap(List<String> keyList, List<V> valueList)
           
 
方法摘要
 void clear()
           
 ArrayList<Pair<String,V>> commonPrefixSearch(String key)
           
 ArrayList<Pair<String,V>> commonPrefixSearch(String key, int offset, int maxResults)
          前缀查询
 boolean containsKey(Object key)
           
 boolean containsKey(String key)
          是否包含key
 boolean containsValue(Object value)
           
 Set<Map.Entry<String,V>> entrySet()
           
 V get(Object key)
           
 V get(String key)
           
 boolean isEmpty()
           
 Set<String> keySet()
           
 V put(String key, V value)
           
 void putAll(Map<? extends String,? extends V> m)
           
 V remove(Object key)
           
 Collection<V> values()
           
 
从类 com.hankcs.hanlp.collection.dartsclone.DoubleArray 继承的方法
build, build, commonPrefixSearch, exactMatchSearch, exactMatchSearch, open, save, size
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 java.util.Map 继承的方法
equals, hashCode, size
 

构造方法详细信息

DartMap

public DartMap(List<String> keyList,
               List<V> valueList)
方法详细信息

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

参数:
key -
返回:

containsValue

public boolean containsValue(Object value)
指定者:
接口 Map<String,V> 中的 containsValue

get

public V get(Object key)
指定者:
接口 Map<String,V> 中的 get

get

public V get(String key)

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 码农场. All rights reserved.