public SortedSet<PdxField> getSortedIdentityFields() {
    if (sortedIdentityFields == null) {
      TreeSet<PdxField> sortedSet = new TreeSet<>();
      for (PdxField field : fields) {
        if (field.isIdentityField() && !field.isDeleted()) {
          sortedSet.add(field);
        }
      }
      // If we don't find any marked identity fields, use all of the fields.
      if (sortedSet.isEmpty()) {
        for (PdxField field : fields) {
          if (!field.isDeleted()) {
            sortedSet.add(field);
          }
        }
      }
      sortedIdentityFields = sortedSet;
    }
    return sortedIdentityFields;
  }
Return true if the this type has a field that the other type does not have.

@param other the type we are comparing to
@return true if the this type has a field that the other type does not have.
geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java