E - type of the elements in this collectionpublic interface ImmutableCollection<E> extends BaseCollection<E>
BaseCollection.
Implementations of this interface are required to disallow adding or
removing of elements. Any mutator method must throw an
UnsupportedOperationException when called.
BaseCollection| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
This operation is not supported.
|
boolean |
addAll(Collection<? extends E> c)
This operation is not supported.
|
void |
clear()
This operation is not supported.
|
contains, getOnly, iterator, remove, removeAll, retainAllcontains, containsAll, equals, hashCode, isEmpty, size, toArray, toArrayboolean add(E e)
This method performs no operation other than throw an
UnsupportedOperationException.
add in interface BaseCollection<E>add in interface Collection<E>e - ignored (this operation is not supported)UnsupportedOperationException - alwaysboolean addAll(Collection<? extends E> c)
This method performs no operation other than throw an
UnsupportedOperationException.
addAll in interface BaseCollection<E>addAll in interface Collection<E>c - ignored (this operation is not supported)UnsupportedOperationException - alwaysvoid clear()
This method performs no operation other than throw an
UnsupportedOperationException.
clear in interface Collection<E>UnsupportedOperationException - alwaysCopyright © 2021–2022 Objectos Software LTDA. All rights reserved.