java.lang.Object | +--org.apache.commons.collections.collection.AbstractCollectionDecorator | +--org.apache.commons.collections.collection.UnmodifiableBoundedCollectionAll Implemented Interfaces:
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) |
public boolean add(Object object)
public boolean addAll(Collection coll)
public void clear()
public static BoundedCollection decorate(BoundedCollection coll)
- if bag is nullpublic static BoundedCollection decorateUsing(Collection coll)
- if bag is nullpublic boolean isFull()
public Iterator iterator()
public int maxSize()
public boolean remove(Object object)
public boolean removeAll(Collection coll)
public boolean retainAll(Collection coll)
UnmodifiableBoundedCollection
decorates anotherBoundedCollection
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 nature is lost. The factory on this class will attempt to retrieve the bounded nature by examining the package scope variables.