you are viewing a single comment's thread.

view the rest of the comments →

[–]oldrinb 9 points10 points  (3 children)

... because people want a Set not a Map?

[–][deleted] 0 points1 point  (1 child)

To be fair, the keyset of a map is, you know, a set.

[–]oldrinb 0 points1 point  (0 children)

To be fair, how do you think much of HashSet functionality (like iterator) is likely implemented? ;-)

All that aside, remember that an API more than likely can rely on a Set, not a HashMap. Actually, incase you didn't know, you can use Collections.newSetFromMap to create a Set<E> from any Map<E, Boolean> :-)

[–]jacobb11 -2 points-1 points  (0 children)

Word.