title: Problem in java.util.Set.addAll() method
body: <p>I have a <code>java.util.Set&lt;City&gt; cities</code> and I need to add cities to this set in 2 ways:</p>
  
  <ul>
  <li><p>By adding individual city (with the help of <code>cities.add(city)</code> method call)</p></li>
  <li><p>By adding another set of cities to this set (with the help of <code>cities.addAll(anotherCitiesSet)</code> method call)</p></li>
  </ul>
  
  <p>But the problem in second approach is that i don't know whether there were any duplicate cities in the <code>anotherCitiesSet</code>.</p>
  
  <p>I want to do some processing whenever a duplicate entry is tried to be entered in the<code>cities</code> set.</p>