Sorry, I'm afraid the whole point of the
Set interface is a collection with no duplicates.
If you want duplicates, the easiest approach within the core
Java libraries would be to use a
List (and ignore the fact that there's an ordering to it). The general term for a collection with duplicates and no ordering is a "Bag", but that's not available in core Java, I don't think. You can probably get free libraries that contain one (e.g. a quick search shows that Apache Commons has one).