Package eu.simuline.util
Class CollectionsExt.ImmutableSet<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- eu.simuline.util.CollectionsExt.AbstractImmutableCollection<Set<E>,E>
-
- eu.simuline.util.CollectionsExt.ImmutableSet<E>
-
- Type Parameters:
E- the class of the elements of this set.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
- Enclosing class:
- CollectionsExt<E>
public static final class CollectionsExt.ImmutableSet<E> extends CollectionsExt.AbstractImmutableCollection<Set<E>,E> implements Set<E>
A set which prevents being modified by throwing an exception for the modifying methods.
-
-
Constructor Summary
Constructors Constructor Description ImmutableSet(Set<E> set)ImmutableSet(Set<CollectionsExt.Modification> mods, Set<E> set)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<E>unrestricted()Returns the underlying set without the restrictions imposed by thisCollectionsExt.ImmutableCollection.-
Methods inherited from class eu.simuline.util.CollectionsExt.AbstractImmutableCollection
add, addAll, allowedModifications, allowModification, allowModifications, clear, iterator, remove, removeAll, removeIf, retainAll, size, toString
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
unrestricted
public Set<E> unrestricted()
Description copied from class:CollectionsExt.AbstractImmutableCollectionReturns the underlying set without the restrictions imposed by thisCollectionsExt.ImmutableCollection. Note that the result may still throwUnsupportedOperationExceptions depending on the implementation.- Specified by:
unrestrictedin classCollectionsExt.AbstractImmutableCollection<Set<E>,E>
-
-