@Override public final int compare(DataValueDescriptor other) { // just use some arbitrary criteria like hashCode for ordering if (this == other) { return 0; } return this.hashCode() - other.hashCode(); }