@Override
    public String toString() {
      return realmPattern != null
        ? String.format("[%d:%s@%s]", expectedComponentCount, matchPattern, realmPattern)
        : String.format("[%d:%s]", expectedComponentCount, matchPattern);
    }
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