The work requires such an object:
Map<RealProfile, ArrayList<ModelledProfile>> example = new HashMap<RealProfile, ArrayList<ModelledProfile>>();
Next, you need to determine whether the object of the RealProfile class is in this map or not , but not all fields should be compared.
How to implement it?
Here is the RealProfile class itself.
public class RealProfile { private String idRealProfile; private Gender gender; private Age age; private Income income; // getters & setters }
Gender, Age and Income are enums. I also need to determine if there is one among the keys that has the same fields as gender, age and income