@Override
    public int hashCode() {
      return new HashCodeBuilder(17, 37)
        .append(matchingRule)
        .append(principal)
        .append(substitution)
        .toHashCode();
    }
@param rule in the following format RULE:[n:string](regexp)s/pattern/replacement/[modifier]/[L]
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java