|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.collection.AbstractCollectionDecorator
org.apache.commons.collections.collection.AbstractSerializableCollectionDecorator
org.apache.commons.collections.collection.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.
| Field Summary |
| Fields inherited from class org.apache.commons.collections.collection.AbstractCollectionDecorator |
collection |
| 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()
Returns true if this collection is full and no new elements can be added. |
Iterator |
iterator()
|
int |
maxSize()
Gets the maximum size of the collection (the bound). |
boolean |
remove(Object object)
|
boolean |
removeAll(Collection coll)
|
boolean |
retainAll(Collection coll)
|
| Methods inherited from class org.apache.commons.collections.collection.AbstractCollectionDecorator |
contains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray |
| Method Detail |
public static BoundedCollection decorate(BoundedCollection coll)
coll - the BoundedCollection to decorate, must not be null
IllegalArgumentException - if bag is nullpublic static BoundedCollection decorateUsing(Collection coll)
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
IllegalArgumentException - if bag is nullpublic Iterator iterator()
iterator in interface Collectioniterator in class AbstractCollectionDecoratorpublic boolean add(Object object)
add in interface Collectionadd in class AbstractCollectionDecoratorpublic boolean addAll(Collection coll)
addAll in interface CollectionaddAll in class AbstractCollectionDecoratorpublic void clear()
clear in interface Collectionclear in class AbstractCollectionDecoratorpublic boolean remove(Object object)
remove in interface Collectionremove in class AbstractCollectionDecoratorpublic boolean removeAll(Collection coll)
removeAll in interface CollectionremoveAll in class AbstractCollectionDecoratorpublic boolean retainAll(Collection coll)
retainAll in interface CollectionretainAll in class AbstractCollectionDecoratorpublic boolean isFull()
BoundedCollection
isFull in interface BoundedCollectiontrue if the collection is fullpublic int maxSize()
BoundedCollection
maxSize in interface BoundedCollection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||