code: public static int compareTierNames(String a, String b) {
      int aValue = getTierRankValue(a);
      int bValue = getTierRankValue(b);
      if (aValue == bValue) {
        return a.compareTo(b);
      }
      return aValue - bValue;
    }
docs: Compares two tier names according to their rank values.
  
  @param a one tier name
  @param b another tier name
  @return compared result