I get a result set from database in the form of Collection which contains few objects of a particular class type. This class implements serializable and comparable implementing compareTo() and overriding equals and hashcode.
The task is to remove duplicate objects (by duplicate i mean with same values) from collection.
One possible approach i can think here is to convert this collection into a Set. But I am not sure how Set removes duplicates and I cannot really check my code as it runs on hub and can b deployed only after build.