@Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;
      MatchingRule that = (MatchingRule) o;
      return new EqualsBuilder()
        .append(expectedComponentCount, that.expectedComponentCount)
        .append(matchPattern, that.matchPattern)
        .append(realmPattern, that.realmPattern)
        .isEquals();
    }
Get the match component count. This is the number of components that are evaluated
when attempting to match a principal to the rule.
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java