Javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131720 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fbe5ab65e5
commit
2bf26f1d36
|
@ -33,7 +33,7 @@ import org.apache.commons.collections.list.UnmodifiableList;
|
|||
* strategy is provided then add and remove are unsupported.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.5 $ $Date: 2004/02/18 00:58:53 $
|
||||
* @version $Revision: 1.6 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Brian McCallister
|
||||
* @author Stephen Colebourne
|
||||
|
@ -113,6 +113,7 @@ public class CompositeCollection implements Collection {
|
|||
* <p>
|
||||
* This implementation calls <code>contains()</code> on each collection.
|
||||
*
|
||||
* @param obj the object to search for
|
||||
* @return true if obj is contained in any of the contained collections
|
||||
*/
|
||||
public boolean contains(Object obj) {
|
||||
|
@ -163,9 +164,10 @@ public class CompositeCollection implements Collection {
|
|||
* Returns an object array, populating the supplied array if possible.
|
||||
* See <code>Collection</code> interface for full details.
|
||||
*
|
||||
* @param array the array to use, populating if possible
|
||||
* @return an array of all the elements in the collection
|
||||
*/
|
||||
public Object[] toArray(Object array[]) {
|
||||
public Object[] toArray(Object[] array) {
|
||||
int size = this.size();
|
||||
Object[] result = null;
|
||||
if (array.length >= size) {
|
||||
|
@ -338,13 +340,18 @@ public class CompositeCollection implements Collection {
|
|||
|
||||
/**
|
||||
* Add an additional collection to this composite.
|
||||
*
|
||||
* @param c the collection to add
|
||||
*/
|
||||
public void addComposited(Collection c) {
|
||||
this.addComposited(new Collection[]{c});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add two additional collection to this composite.
|
||||
* Add two additional collections to this composite.
|
||||
*
|
||||
* @param c the first collection to add
|
||||
* @param d the second collection to add
|
||||
*/
|
||||
public void addComposited(Collection c, Collection d) {
|
||||
this.addComposited(new Collection[]{c, d});
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.apache.commons.collections.Predicate;
|
|||
* is thrown.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:58:53 $
|
||||
* @version $Revision: 1.4 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @author Paul Jack
|
||||
|
@ -46,6 +46,7 @@ public class PredicatedCollection extends AbstractCollectionDecorator {
|
|||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param predicate the predicate to use for validation, must not be null
|
||||
* @return a new predicated collection
|
||||
* @throws IllegalArgumentException if collection or predicate is null
|
||||
* @throws IllegalArgumentException if the collection contains invalid elements
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Iterator;
|
|||
* </pre>
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:58:53 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
*/
|
||||
|
@ -46,6 +46,7 @@ public class SynchronizedCollection implements Collection {
|
|||
* Factory method to create a synchronized collection.
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @return a new synchronized collection
|
||||
* @throws IllegalArgumentException if collection is null
|
||||
*/
|
||||
public static Collection decorate(Collection coll) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.apache.commons.collections.Transformer;
|
|||
* use the Integer form to remove objects.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:58:53 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
*/
|
||||
|
@ -48,6 +48,7 @@ public class TransformedCollection extends AbstractCollectionDecorator {
|
|||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param transformer the transformer to use for conversion, must not be null
|
||||
* @return a new transformed collection
|
||||
* @throws IllegalArgumentException if collection or transformer is null
|
||||
*/
|
||||
public static Collection decorate(Collection coll, Transformer transformer) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.commons.collections.functors.InstanceofPredicate;
|
|||
* collection, an IllegalArgumentException is thrown.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.4 $ $Date: 2004/05/07 23:28:38 $
|
||||
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @author Matthew Hawthorne
|
||||
|
@ -42,6 +42,7 @@ public class TypedCollection {
|
|||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @param type the type to allow into the collection, must not be null
|
||||
* @return a new typed collection
|
||||
* @throws IllegalArgumentException if collection or type is null
|
||||
* @throws IllegalArgumentException if the collection contains invalid elements
|
||||
*/
|
||||
|
@ -53,6 +54,7 @@ public class TypedCollection {
|
|||
* Restrictive constructor.
|
||||
*/
|
||||
protected TypedCollection() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
|
|||
* examining the package scope variables.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.7 $ $Date: 2004/04/14 20:11:45 $
|
||||
* @version $Revision: 1.8 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
*/
|
||||
|
@ -42,6 +42,7 @@ public final class UnmodifiableBoundedCollection extends AbstractCollectionDecor
|
|||
* Factory method to create an unmodifiable bounded collection.
|
||||
*
|
||||
* @param coll the <code>BoundedCollection</code> to decorate, must not be null
|
||||
* @return a new unmodifiable bounded collection
|
||||
* @throws IllegalArgumentException if bag is null
|
||||
*/
|
||||
public static BoundedCollection decorate(BoundedCollection coll) {
|
||||
|
@ -55,6 +56,7 @@ public final class UnmodifiableBoundedCollection extends AbstractCollectionDecor
|
|||
* to find a suitable BoundedCollection.
|
||||
*
|
||||
* @param coll the <code>BoundedCollection</code> to decorate, must not be null
|
||||
* @return a new unmodifiable bounded collection
|
||||
* @throws IllegalArgumentException if bag is null
|
||||
*/
|
||||
public static BoundedCollection decorateUsing(Collection coll) {
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
|
|||
* Decorates another <code>Collection</code> to ensure it can't be altered.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.5 $ $Date: 2004/02/18 00:58:53 $
|
||||
* @version $Revision: 1.6 $ $Date: 2004/05/15 12:39:13 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
*/
|
||||
|
@ -33,8 +33,11 @@ public final class UnmodifiableCollection extends AbstractCollectionDecorator im
|
|||
|
||||
/**
|
||||
* Factory method to create an unmodifiable collection.
|
||||
* <p>
|
||||
* If the collection passed in is already unmodifiable, it is returned.
|
||||
*
|
||||
* @param coll the collection to decorate, must not be null
|
||||
* @return an unmodifiable collection
|
||||
* @throws IllegalArgumentException if collection is null
|
||||
*/
|
||||
public static Collection decorate(Collection coll) {
|
||||
|
|
Loading…
Reference in New Issue