mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-16 06:56:05 +00:00
Javadoc improvements
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
90e985280f
commit
c4d88de091
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CollectionUtils.java,v 1.39 2003/09/09 21:25:18 scolebourne Exp $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CollectionUtils.java,v 1.40 2003/09/09 21:36:53 scolebourne Exp $
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
@ -81,7 +81,7 @@ import org.apache.commons.collections.iterators.EnumerationIterator;
|
||||
* A set of {@link Collection} related utility methods.
|
||||
*
|
||||
* @since Commons Collections 1.0
|
||||
* @version $Revision: 1.39 $ $Date: 2003/09/09 21:25:18 $
|
||||
* @version $Revision: 1.40 $ $Date: 2003/09/09 21:36:53 $
|
||||
*
|
||||
* @author Rodney Waldhoff
|
||||
* @author Paul Jack
|
||||
@ -806,9 +806,8 @@ public class CollectionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverses the order of the given array
|
||||
* Reverses the order of the given array.
|
||||
*
|
||||
* @param array the array to reverse
|
||||
*/
|
||||
@ -843,14 +842,22 @@ public class CollectionUtils {
|
||||
* This method uses the {@link BoundedCollection} class to determine the
|
||||
* full status. If the collection does not implement this interface then
|
||||
* false is returned.
|
||||
* <p>
|
||||
* The collection does not have to implement this interface directly.
|
||||
* If the collection has been decorated using the decorators subpackage
|
||||
* then these will be removed to access the BoundedCollection.
|
||||
*
|
||||
* @return true if the Collection is full
|
||||
* @param coll the collection to check
|
||||
* @return true if the BoundedCollection is full
|
||||
* @throws NullPointerException if the collection is null
|
||||
*/
|
||||
public static boolean isFull(Collection coll) {
|
||||
if (coll == null) {
|
||||
throw new NullPointerException("The collection must not be null");
|
||||
}
|
||||
if (coll instanceof BoundedCollection) {
|
||||
return ((BoundedCollection) coll).isFull();
|
||||
}
|
||||
try {
|
||||
BoundedCollection bcoll = UnmodifiableBoundedCollection.decorateUsing(coll);
|
||||
return bcoll.isFull();
|
||||
@ -866,14 +873,22 @@ public class CollectionUtils {
|
||||
* This method uses the {@link BoundedCollection} class to determine the
|
||||
* maximum size. If the collection does not implement this interface then
|
||||
* -1 is returned.
|
||||
* <p>
|
||||
* The collection does not have to implement this interface directly.
|
||||
* If the collection has been decorated using the decorators subpackage
|
||||
* then these will be removed to access the BoundedCollection.
|
||||
*
|
||||
* @return the maximum size of the Collection, -1 if no maximum size
|
||||
* @param coll the collection to check
|
||||
* @return the maximum size of the BoundedCollection, -1 if no maximum size
|
||||
* @throws NullPointerException if the collection is null
|
||||
*/
|
||||
public static int maxSize(Collection coll) {
|
||||
if (coll == null) {
|
||||
throw new NullPointerException("The collection must not be null");
|
||||
}
|
||||
if (coll instanceof BoundedCollection) {
|
||||
return ((BoundedCollection) coll).maxSize();
|
||||
}
|
||||
try {
|
||||
BoundedCollection bcoll = UnmodifiableBoundedCollection.decorateUsing(coll);
|
||||
return bcoll.maxSize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user