mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -16,7 +16,7 @@ public final class SensitiveUtil {
|
||||
// private static final Log log = LogFactory.get();
|
||||
|
||||
public static final char DEFAULT_SEPARATOR = StrUtil.C_COMMA;
|
||||
private static WordTree sensitiveTree = new WordTree();
|
||||
private static final WordTree sensitiveTree = new WordTree();
|
||||
|
||||
/**
|
||||
* @return 是否已经被初始化
|
||||
|
@@ -1,5 +1,10 @@
|
||||
package cn.hutool.dfa;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Filter;
|
||||
import cn.hutool.core.text.StrBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -7,11 +12,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Filter;
|
||||
import cn.hutool.core.text.StrBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* DFA(Deterministic Finite Automaton 确定有穷自动机)
|
||||
* DFA单词树(以下简称单词树),常用于在某大段文字中快速查找某几个关键词是否存在。<br>
|
||||
@@ -33,7 +33,7 @@ public class WordTree extends HashMap<Character, WordTree> {
|
||||
/**
|
||||
* 敏感词字符末尾标识,用于标识单词末尾字符
|
||||
*/
|
||||
private Set<Character> endCharacterSet = new HashSet<>();
|
||||
private final Set<Character> endCharacterSet = new HashSet<>();
|
||||
/**
|
||||
* 字符过滤规则,通过定义字符串过滤规则,过滤不需要的字符,当accept为false时,此字符不参与匹配
|
||||
*/
|
||||
|
Reference in New Issue
Block a user