What would be the best means of going about this without explicit comparison?
If List Of Object contains Strings , You need to Add them to Set.
Strings
Set
If the list contains Custom object , override equals meth in the custom class and those object to Set
2.1m questions
2.1m answers
60 comments
57.0k users