Class FoundWord
java.lang.Object
com.sure.tool.dfa.FoundWord
敏感词命中结果:命中的词 + 在文本中的起止索引(含两端),参考 Hutool 的
FoundWord 设计。
不可变对象,可作为 Map/Set 键使用。- Since:
- 0.1.0
- Author:
- suretool
-
Constructor Details
-
FoundWord
创建命中结果。- Parameters:
word- 命中的敏感词startIndex- 起始索引(含)endIndex- 结束索引(含)
-
-
Method Details
-
getWord
-
getStartIndex
public int getStartIndex()起始索引(含)。- Returns:
- 起始索引
-
getEndIndex
public int getEndIndex()结束索引(含)。- Returns:
- 结束索引
-
equals
-
hashCode
-
toString
-