Good afternoon
In Java, I have HashSet which contain list of Object User which has properties:
- group
- machinename
now my hashset has following values (list of above object)
email | group | machinename
----------------------------------------
robert@yahoo.com | hewitt | AP1
Mathew@gmail.com | test | AP1
melody@app.com | test | AP1
nick@ac.co | test | AP1
robert@yahoo.com | project | AP1
nick@ac.co | project | AP1
Now I have to find those records which has same email and machine but different group name which in above case are:
nick@ac.co (which has "project" and "test" group)
robert@yahoo.com (which has "hewitt" and "test" groups)
How can I find that using java code?
This will do exactly what you want: