public class SuffixDictionary extends Object
| Constructor and Description |
|---|
SuffixDictionary() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String word)
添加一个词语
|
void |
addAll(String total) |
void |
addAll(String[] total) |
boolean |
endsWith(String word)
词语是否以该词典中的某个单词结尾
|
Set<Map.Entry<String,Integer>> |
entrySet()
键值对
|
int |
get(String suffix)
查找是否有该后缀
|
int |
getLongestSuffixLength(String word)
获取最长的后缀
|
public void add(String word)
word - public void addAll(String total)
public void addAll(String[] total)
public int get(String suffix)
suffix - public boolean endsWith(String word)
word - public int getLongestSuffixLength(String word)
word - Copyright © 2014–2021 码农场. All rights reserved.