@Override
  public int compareTo(HiveRoleGrant other) {
    if(other == null){
      return 1;
    }
    return ComparisonChain.start().compare(roleName, other.roleName)
        .compare(principalName, other.principalName)
        .compare(principalType, other.principalType)
        .compare(grantOption, other.grantOption)
        .compare(grantTime, other.grantTime)
        .compare(grantor, other.grantor)
        .result();

  }
Represents a grant of a role to a principal
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveRoleGrant.java