Class RegexComplex<E>

java.lang.Object
org.miaixz.bus.shade.safety.complex.RegexComplex<E>
All Implemented Interfaces:
Complex<E>
Direct Known Subclasses:
AntComplex, DirRegexComplex, JarRegexComplex, ZipRegexComplex

public abstract class RegexComplex<E> extends Object implements Complex<E>
正则表达式规则
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • pattern

      protected final Pattern pattern
  • Constructor Details

    • RegexComplex

      protected RegexComplex(String regex)
    • RegexComplex

      protected RegexComplex(Pattern pattern)
  • Method Details

    • on

      public boolean on(E entry)
      Description copied from interface: Complex
      记录是否需要加/解密
      Specified by:
      on in interface Complex<E>
      Parameters:
      entry - 记录
      Returns:
      true: 需要 false:不需要
    • toText

      protected abstract String toText(E entry)
      将记录转换成字符串形式,用于模式匹配
      Parameters:
      entry - 记录
      Returns:
      记录的字符串表达形式