< prev index next >

src/java.base/share/classes/java/util/AbstractCollection.java

Print this page
rev 54827 : 6394757: AbstractSet.removeAll semantics are surprisingly dependent on relative sizes
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 314,323 **** --- 314,326 ---- * This implementation iterates over the specified collection, * checking each element returned by the iterator in turn to see * if it's contained in this collection. If all elements are so * contained {@code true} is returned, otherwise {@code false}. * + * @implNote + * {@inheritDoc} + * * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} * @see #contains(Object) */ public boolean containsAll(Collection<?> c) {
*** 356,376 **** /** * {@inheritDoc} * * @implSpec ! * This implementation iterates over this collection, checking each ! * element returned by the iterator in turn to see if it's contained ! * in the specified collection. If it's so contained, it's removed from ! * this collection with the iterator's {@code remove} method. * * <p>Note that this implementation will throw an * {@code UnsupportedOperationException} if the iterator returned by the * {@code iterator} method does not implement the {@code remove} method * and this collection contains one or more elements in common with the * specified collection. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} * * @see #remove(Object) --- 359,383 ---- /** * {@inheritDoc} * * @implSpec ! * This implementation iterates over each element of this collection by ! * obtaining an iterator from the {@code iterator} method. Each element ! * is passed to the {@code contains} method of the specified collection. ! * If {@code contains} returns {@code true}, the element is removed from this ! * collection with the iterator's {@code remove} method. * * <p>Note that this implementation will throw an * {@code UnsupportedOperationException} if the iterator returned by the * {@code iterator} method does not implement the {@code remove} method * and this collection contains one or more elements in common with the * specified collection. * + * @implNote + * {@inheritDoc} + * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} * * @see #remove(Object)
*** 391,411 **** /** * {@inheritDoc} * * @implSpec ! * This implementation iterates over this collection, checking each ! * element returned by the iterator in turn to see if it's contained ! * in the specified collection. If it's not so contained, it's removed ! * from this collection with the iterator's {@code remove} method. * * <p>Note that this implementation will throw an * {@code UnsupportedOperationException} if the iterator returned by the * {@code iterator} method does not implement the {@code remove} method * and this collection contains one or more elements not present in the * specified collection. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} * * @see #remove(Object) --- 398,422 ---- /** * {@inheritDoc} * * @implSpec ! * This implementation iterates over each element of this collection by ! * obtaining an iterator from the {@code iterator} method. Each element ! * is passed to the {@code contains} method of the specified collection. ! * If {@code contains} returns {@code false}, the element is removed from ! * this collection with the iterator's {@code remove} method. * * <p>Note that this implementation will throw an * {@code UnsupportedOperationException} if the iterator returned by the * {@code iterator} method does not implement the {@code remove} method * and this collection contains one or more elements not present in the * specified collection. * + * @implNote + * {@inheritDoc} + * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} * * @see #remove(Object)
< prev index next >