public final class UnmodifiableCollection extends AbstractSerializableCollectionDecorator implements Unmodifiable
Collection to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
collection| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object object) |
boolean |
addAll(Collection coll) |
void |
clear() |
static Collection |
decorate(Collection coll)
Factory method to create an unmodifiable collection.
|
Iterator |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection coll) |
boolean |
retainAll(Collection coll) |
contains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray, toStringpublic static Collection decorate(Collection coll)
If the collection passed in is already unmodifiable, it is returned.
coll - the collection to decorate, must not be nullIllegalArgumentException - if collection is nullpublic Iterator iterator()
iterator in interface Iterableiterator 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 AbstractCollectionDecoratorCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.