public boolean equals(Object other) { if (this == other) return true; if (!(other instanceof TypeInfo)) { return false; } TypeInfo o = (TypeInfo) other; return o.getCategory().equals(getCategory()) && o.getPrimitiveClass().equals(getPrimitiveClass()); }