public abstract class SimpleDictionary<V> extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
SimpleDictionary.Filter<V> |
| 构造器和说明 |
|---|
SimpleDictionary() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(String key,
V value)
向中加入单词
|
void |
combine(SimpleDictionary<V> other)
以我为主词典,合并一个副词典,我有的词条不会被副词典覆盖
|
Set<Map.Entry<String,V>> |
entrySet()
获取键值对集合
|
V |
get(String key)
查询一个单词
|
Set<String> |
keySet()
键集合
|
boolean |
load(String path) |
protected abstract Map.Entry<String,V> |
onGenerateEntry(String line)
由参数构造一个词条
|
int |
remove(SimpleDictionary.Filter filter)
过滤部分词条
|
int |
size() |
public boolean load(String path)
protected abstract Map.Entry<String,V> onGenerateEntry(String line)
line - public void combine(SimpleDictionary<V> other)
other - 副词典public int remove(SimpleDictionary.Filter filter)
filter - 过滤器public int size()
Copyright © 2014–2017 码农场. All rights reserved.