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
548k questions
547k answers
4 comments
86.3k users