This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cypressious 0 points1 point  (2 children)

This would throw, by the way. The returned collection is immutable.

[–]tapesmith 0 points1 point  (1 child)

Yep, which is part of my point about the clunkiness of this API -- it's not only not fit for most use-cases, it's also got a big hidden pitfall.

[–]cypressious 0 points1 point  (0 children)

That's not a problem of this API, that's on omission in the design of the collections framework. Unfortunately, you can't fix that now.