aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/AbstractCollection.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/AbstractCollection.java')
-rw-r--r--libjava/java/util/AbstractCollection.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/libjava/java/util/AbstractCollection.java b/libjava/java/util/AbstractCollection.java
index fc0c23a..a98f41e 100644
--- a/libjava/java/util/AbstractCollection.java
+++ b/libjava/java/util/AbstractCollection.java
@@ -129,11 +129,13 @@ public abstract class AbstractCollection implements Collection
* @return true if the add operation caused the Collection to change
* @throws UnsupportedOperationException if the add operation is not
* supported on this collection
- * @throws NullPointerException if this collection does not support null,
- * or if the specified collection is null
- * @throws ClassCastException if an object in c is of the wrong type
- * @throws IllegalArgumentException if some aspect of an object in c prevents
- * it from being added
+ * @throws NullPointerException if the specified collection is null
+ * @throws ClassCastException if the type of any element in c is
+ * not a valid type for addition.
+ * @throws IllegalArgumentException if some aspect of any element
+ * in c prevents it being added.
+ * @throws NullPointerException if any element in c is null and this
+ * collection doesn't allow null values.
* @see #add(Object)
*/
public boolean addAll(Collection c)
@@ -268,6 +270,7 @@ public abstract class AbstractCollection implements Collection
* @return true if the remove operation caused the Collection to change
* @throws UnsupportedOperationException if this collection's Iterator
* does not support the remove method
+ * @throws NullPointerException if the collection, c, is null.
* @see Iterator#remove()
*/
public boolean removeAll(Collection c)
@@ -288,8 +291,10 @@ public abstract class AbstractCollection implements Collection
* @return true if the remove operation caused the Collection to change
* @throws UnsupportedOperationException if this collection's Iterator
* does not support the remove method
+ * @throws NullPointerException if the collection, c, is null.
* @see Iterator#remove()
*/
+ // Package visible for use throughout java.util.
boolean removeAllInternal(Collection c)
{
Iterator itr = iterator();
@@ -316,6 +321,7 @@ public abstract class AbstractCollection implements Collection
* @return true if the remove operation caused the Collection to change
* @throws UnsupportedOperationException if this collection's Iterator
* does not support the remove method
+ * @throws NullPointerException if the collection, c, is null.
* @see Iterator#remove()
*/
public boolean retainAll(Collection c)
@@ -337,8 +343,10 @@ public abstract class AbstractCollection implements Collection
* @return true if the remove operation caused the Collection to change
* @throws UnsupportedOperationException if this collection's Iterator
* does not support the remove method
+ * @throws NullPointerException if the collection, c, is null.
* @see Iterator#remove()
*/
+ // Package visible for use throughout java.util.
boolean retainAllInternal(Collection c)
{
Iterator itr = iterator();