private static boolean areCharsEquivalent(RegExpChar aChar1, RegExpChar aChar2) {
    return aChar1 == null ? aChar2 == null : aChar2 != null && aChar1.getValue() == aChar2.getValue();
  }
private static boolean areCharsEquivalent(RegExpChar aChar1, RegExpChar aChar2)