E - the class of the elements of this collection.public static final class CollectionsExt.ImmutableCollection<E> extends CollectionsExt.AbstractImmutableCollection<Collection<E>,E> implements Collection<E>
| Modifier and Type | Field and Description |
|---|---|
private Collection<E> |
coll
The enclosed set containing the elements of this set.
|
| Constructor and Description |
|---|
ImmutableCollection(Collection<E> coll)
Creates a new empty
ImmutableCollection
which equals coll but cannot be modified
neither directly nor via its iterator. |
| Modifier and Type | Method and Description |
|---|---|
Collection<E> |
unrestricted()
Returns the underlying set without the restrictions
imposed by this
CollectionsExt.ImmutableCollection. |
add, addAll, allowedModifications, allowModification, allowModifications, clear, iterator, remove, removeAll, removeIf, retainAll, size, toStringcontains, containsAll, isEmpty, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayprivate final Collection<E> coll
ImmutableCollection(Collection<E> coll)
ImmutableCollection
which equals coll but cannot be modified
neither directly nor via its iterator.NullPointerException - if coll==null.public Collection<E> unrestricted()
CollectionsExt.AbstractImmutableCollectionCollectionsExt.ImmutableCollection.
Note that the result
may still throw UnsupportedOperationExceptions
depending on the implementation.unrestricted in class CollectionsExt.AbstractImmutableCollection<Collection<E>,E>Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.