public interface ForbidWordService
限定符和类型 | 方法和说明 |
---|---|
boolean |
addForbidWord(boolean refreshNow,
String... words)
增加禁用词,通常基于文件的禁用词库不支持持久化,基于数据库的可以支持
|
int |
forbidWordCount(String text)
文本包含的禁用词数量
|
List<String> |
forbidWordList(String text)
文本包含的禁用词列表
|
boolean |
include(String text)
文本是否包含禁用词
|
boolean |
removeForbidWord(boolean refreshNow,
String... words)
删除禁用词,通常基于文件的禁用词库不支持持久化,基于数据库的可以支持
|
String |
replace(String text,
char symbol)
将文本中包含的禁用词的每个字符以指定符号代替
|
boolean include(String text)
text
- the textint forbidWordCount(String text)
text
- the textString replace(String text, char symbol)
text
- the textsymbol
- the symbolboolean addForbidWord(boolean refreshNow, String... words)
refreshNow
- 成功后是否立即刷新words
- the wordsboolean removeForbidWord(boolean refreshNow, String... words)
refreshNow
- 成功后是否立即刷新words
- the words