harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r422661 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
Date Mon, 17 Jul 2006 10:08:04 GMT
Author: gharley
Date: Mon Jul 17 03:08:03 2006
New Revision: 422661

URL: http://svn.apache.org/viewvc?rev=422661&view=rev
Log:
HARMONY 861 : [luni] Javadoc of java.util.AbstractCollection.add() is missing

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java?rev=422661&r1=422660&r2=422661&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/AbstractCollection.java
Mon Jul 17 03:08:03 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,35 @@
 		super();
 	}
 
+    /**
+     * If the specified element is not contained within this collection, and
+     * addition of this element succeeds, then true will be returned. If the
+     * specified element is already contained within this collection, or
+     * duplication is not permitted, false will be returned. Different
+     * implementations may add specific limitations on this method to filter
+     * permitted elements. For example, in some implementation, null element may
+     * be denied, and NullPointerException will be thrown out. These limitations
+     * should be explicitly documented by specific collection implmentation.
+     * 
+     * Add operation is not supported in this implementation, and
+     * UnsupportedOperationException will always be thrown out.
+     * 
+     * @param object
+     *            the element to be added.
+     * @return true if the collection is changed successfully after invoking
+     *         this method. Otherwise, false.
+     * @exception UnsupportedOperationException
+     *                if add operation is not supported by this class.
+     * @exception NullPointerException
+     *                if null is used to invoke this method, and null is not
+     *                permitted by this collection.
+     * @exception ClassCastException
+     *                if the class type of the specified element is not
+     *                compatible with the permitted class type.
+     * @exception IllegalArgumentException
+     *                if limitations of this collection prevent the specified
+     *                element from being added
+     */
 	public boolean add(E object) {
 		throw new UnsupportedOperationException();
 	}



Mime
View raw message