I have to remove duplicated objects in a List. It is a List from the object Blog that looks like this:
public class Blog {
private String title;
priv
hashCode() and equals(..) using those 4 fieldsnew HashSet(blogList) - this will give you a Set which has no duplicates by definitionUpdate: Since you can't change the class, here's an O(n^2) solution:
You can make this more efficient if you provide a HashSet data structure with externalized hashCode() and equals(..) methods.