Interface RegexStringComparator.Engine

All Known Implementing Classes:
RegexStringComparator.JavaRegexEngine, RegexStringComparator.JoniRegexEngine
Enclosing class:
RegexStringComparator

This is an internal interface for abstracting access to different regular expression matching engines.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(byte[] value, int offset, int length)
    Match the given input against the configured pattern
    Returns the name of the configured charset
    int
    Returns the set of configured match flags, a bit mask that may include Pattern flags
    Returns the string representation of the configured regular expression for matching
    void
    setCharset(String charset)
    Set the charset used when matching
    byte[]
    Return the serialized form of the configured matcher
  • Method Details

    • getPattern

      Returns the string representation of the configured regular expression for matching
    • getFlags

      int getFlags()
      Returns the set of configured match flags, a bit mask that may include Pattern flags
    • getCharset

      Returns the name of the configured charset
    • setCharset

      void setCharset(String charset)
      Set the charset used when matching
      Parameters:
      charset - the name of the desired charset for matching
    • toByteArray

      byte[] toByteArray()
      Return the serialized form of the configured matcher
    • compareTo

      int compareTo(byte[] value, int offset, int length)
      Match the given input against the configured pattern
      Parameters:
      value - the data to be matched
      offset - offset of the data to be matched
      length - length of the data to be matched
      Returns:
      0 if a match was made, 1 otherwise