Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • You probably want to clear or do a defensive copy in the set otherwise it isn't really a setter more an addAll. Commented Apr 2, 2013 at 20:12
  • @bmorris591: Thanks I changed the method name to avoid confusion. Commented Apr 2, 2013 at 20:16
  • 1
    Very similar to my own answer, but perhaps better design overall to have the add and addAll methods like this. I suspect we were typing at the same time. +1 Commented Apr 2, 2013 at 20:23