Add functions equals() and hashCode in the synchronized collection.