org.apache.commons.collections.collection
Class UnmodifiableBoundedCollection
- BoundedCollection, Collection, Serializable
public final class UnmodifiableBoundedCollection
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.
$Revision: 1.10 $ $Date: 2004/06/03 22:02:13 $
add , addAll , clear , contains , containsAll , equals , getCollection , hashCode , isEmpty , iterator , remove , removeAll , retainAll , size , toArray , toArray , toString |
decorate
public static BoundedCollection decorate(BoundedCollection coll)
Factory method to create an unmodifiable bounded collection.
coll
- the BoundedCollection
to decorate, must not be null
- a new unmodifiable bounded collection
decorateUsing
public static BoundedCollection decorateUsing(Collection coll)
Factory method to create an unmodifiable bounded collection.
This method is capable of drilling down through up to 1000 other decorators
to find a suitable BoundedCollection.
coll
- the BoundedCollection
to decorate, must not be null
- a new unmodifiable bounded collection
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.