package com.ruoyi.cms.util.sensitiveWord;

import java.util.HashMap;
import java.util.Map;

class TrieNode {
    // 子节点：key=字符，value=子节点
    private final Map<Character, TrieNode> children = new HashMap<>();
    // 标记当前节点是否为敏感词的结尾
    private boolean isEnd = false;

    public Map<Character, TrieNode> getChildren() {
        return children;
    }

    public boolean isEnd() {
        return isEnd;
    }

    public void setEnd(boolean end) {
        isEnd = end;
    }
}