@Override
  boolean areSerializedFieldsEqual(ByteArrayComparable other) {
    if (other == this) {
      return true;
    }
    if (!(other instanceof RegexStringComparator)) {
      return false;
    }
    RegexStringComparator comparator = (RegexStringComparator) other;
    return super.areSerializedFieldsEqual(comparator)
      && engine.getClass().isInstance(comparator.getEngine())
      && engine.getPattern().equals(comparator.getEngine().getPattern())
      && engine.getFlags() == comparator.getEngine().getFlags()
      && engine.getCharset().equals(comparator.getEngine().getCharset());
  }
Returns true if and only if the fields of the comparator that are serialized are equal to the
corresponding fields in other. Used for testing.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java