If you tweak the hash codes and other values of two Objects, they are no longer duplicates. Therefore, the phrasing of the question is somewhat irrelevant and not answerable.

Sets do not allow...