jdk/src/share/classes/java/util/AbstractSet.java
changeset 17441 5ae43433d158
parent 14342 8435a30053c1
child 22078 bdec5d53e98c
equal deleted inserted replaced
17440:fb37aa6b305e 17441:5ae43433d158
   164      *         or if the specified collection is null
   164      *         or if the specified collection is null
   165      * @see #remove(Object)
   165      * @see #remove(Object)
   166      * @see #contains(Object)
   166      * @see #contains(Object)
   167      */
   167      */
   168     public boolean removeAll(Collection<?> c) {
   168     public boolean removeAll(Collection<?> c) {
       
   169         Objects.requireNonNull(c);
   169         boolean modified = false;
   170         boolean modified = false;
   170 
   171 
   171         if (size() > c.size()) {
   172         if (size() > c.size()) {
   172             for (Iterator<?> i = c.iterator(); i.hasNext(); )
   173             for (Iterator<?> i = c.iterator(); i.hasNext(); )
   173                 modified |= remove(i.next());
   174                 modified |= remove(i.next());