E - the type of content of this Setpublic class ImmutableHashSet<E> extends ImmutableAbstractSet<E>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier | Constructor and Description |
|---|---|
|
ImmutableHashSet(Collection<E> collection) |
protected |
ImmutableHashSet(Collection<E> collection,
boolean copy) |
|
ImmutableHashSet(Collection<E> collection,
Immutable copyOrWrap) |
|
ImmutableHashSet(ImmutableCollection<E> collection) |
|
ImmutableHashSet(ImmutableCollection<E> collection,
Immutable copyOrWrap) |
| Modifier and Type | Method and Description |
|---|---|
protected HashSet<E> |
getSet()
Prepare the set of the right type for use a subclass.
|
Set<E> |
toSet()
Returns a modifiable copy of this immutable set.
|
String |
toString() |
contains, containsAll, containsAll, equals, forEach, hashCode, isEmpty, isWrap, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toCollectionclone, finalize, getClass, notify, notifyAll, wait, wait, waitisCopypublic ImmutableHashSet(Collection<E> collection)
collection - the collection to use as the immutable set.public ImmutableHashSet(Collection<E> collection, Immutable copyOrWrap)
collection - the collection to use as the immutable set.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionprotected ImmutableHashSet(Collection<E> collection, boolean copy)
collection - the collection to use as the immutable set.copy - boolean; indicates whether the immutable is a copy or a wrappublic ImmutableHashSet(ImmutableCollection<E> collection)
collection - the collection to use as the immutable set.public ImmutableHashSet(ImmutableCollection<E> collection, Immutable copyOrWrap)
collection - the collection to use as the immutable set.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionprotected final HashSet<E> getSet()
@Override
protected ArraySet<E> getSet()
{
return (ArraySet<E>) super.getSet();
}
getSet in class ImmutableAbstractSet<E>public final Set<E> toSet()
public String toString()
toString in class ImmutableAbstractSet<E>Copyright © 2014–2016 Delft University of Technology. All rights reserved.