public final class UnmodifiableSet extends AbstractSerializableSetDecorator implements Unmodifiable
Set to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object object) |
boolean |
addAll(java.util.Collection coll) |
void |
clear() |
static java.util.Set |
decorate(java.util.Set set)
Factory method to create an unmodifiable set.
|
java.util.Iterator |
iterator() |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection coll) |
boolean |
retainAll(java.util.Collection coll) |
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray, toStringpublic static java.util.Set decorate(java.util.Set set)
set - the set to decorate, must not be nulljava.lang.IllegalArgumentException - if set is nullpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class AbstractCollectionDecoratorpublic boolean add(java.lang.Object object)
add in interface java.util.Collectionadd in interface java.util.Setadd in class AbstractCollectionDecoratorpublic boolean addAll(java.util.Collection coll)
addAll in interface java.util.CollectionaddAll in interface java.util.SetaddAll in class AbstractCollectionDecoratorpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class AbstractCollectionDecoratorpublic boolean remove(java.lang.Object object)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class AbstractCollectionDecoratorpublic boolean removeAll(java.util.Collection coll)
removeAll in interface java.util.CollectionremoveAll in interface java.util.SetremoveAll in class AbstractCollectionDecoratorpublic boolean retainAll(java.util.Collection coll)
retainAll in interface java.util.CollectionretainAll in interface java.util.SetretainAll in class AbstractCollectionDecoratorCopyright © 2010 - 2023 Adobe. All Rights Reserved