From 477a21f7f9b31c687d45f1001dd93c90df52cf29 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Sun, 29 Aug 2004 17:28:09 +0000 Subject: AbstractCollection.java, [...]: Added additional exceptions to documentation... 2004-08-29 Andrew John Hughes * java/util/AbstractCollection.java, java/util/AbstractList.java, java/util/AbstractMap.java, java/util/AbstractSequentialList.java, java/util/ArrayList.java, java/util/Arrays.java, java/util/BitSet.java, java/util/Calendar.java, java/util/Collection.java, java/util/ListIterator.java, java/util/Map.java, java/util/SortedSet.java: Added additional exceptions to documentation, along with some additions and corrections. From-SVN: r86730 --- libjava/java/util/AbstractCollection.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'libjava/java/util/AbstractCollection.java') 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(); -- cgit v1.1