org.apache.commons.collections.collection
public final class UnmodifiableBoundedCollection extends AbstractSerializableCollectionDecorator implements BoundedCollection
UnmodifiableBoundedCollection
decorates another
BoundedCollection
to ensure it can't be altered.
If a BoundedCollection is first wrapped in some other collection decorator, such as synchronized or predicated, the BoundedCollection methods are no longer accessible. The factory on this class will attempt to retrieve the bounded nature by examining the package scope variables.
This class is Serializable from Commons Collections 3.1.
Since: Commons Collections 3.0
Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
Method Summary | |
---|---|
boolean | add(Object object) |
boolean | addAll(Collection coll) |
void | clear() |
static BoundedCollection | decorate(BoundedCollection coll)
Factory method to create an unmodifiable bounded collection.
|
static BoundedCollection | decorateUsing(Collection coll)
Factory method to create an unmodifiable bounded collection.
|
boolean | isFull() |
Iterator | iterator() |
int | maxSize() |
boolean | remove(Object object) |
boolean | removeAll(Collection coll) |
boolean | retainAll(Collection coll) |
Parameters: coll the BoundedCollection
to decorate, must not be null
Returns: a new unmodifiable bounded collection
Throws: IllegalArgumentException if bag is null
This method is capable of drilling down through up to 1000 other decorators to find a suitable BoundedCollection.
Parameters: coll the BoundedCollection
to decorate, must not be null
Returns: a new unmodifiable bounded collection
Throws: IllegalArgumentException if bag is null