Interface ByteIndexer
- All Known Implementing Classes:
KMPByteIndexer, SingleByteIndexer
public interface ByteIndexer
ByteIndexer
- Version:
- 0.0.1
- Author:
- scx567888
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint支持跨 chunk 的回溯匹配, 因此返回值可能为负数 若未匹配到 请返回 NO_MATCH 若当前匹配模式为空, 永远返回 0 (即使 ByteChunk 为空)boolean是否为空匹配模式 (匹配空 ByteChunk 恒成立)
-
Field Details
-
NO_MATCH
static final int NO_MATCH- See Also:
-
-
Method Details
-
indexOf
支持跨 chunk 的回溯匹配, 因此返回值可能为负数 若未匹配到 请返回 NO_MATCH 若当前匹配模式为空, 永远返回 0 (即使 ByteChunk 为空)- Parameters:
chunk- chunk- Returns:
- 匹配的索引位置
-
isEmptyPattern
boolean isEmptyPattern()是否为空匹配模式 (匹配空 ByteChunk 恒成立)
-