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.
Constructor and Description |
---|
ImmutableHashSet(Collection<E> collection) |
ImmutableHashSet(ImmutableCollection<E> collection) |
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, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toCollection
public ImmutableHashSet(Collection<E> collection)
collection
- the set to use as the immutable set.public ImmutableHashSet(ImmutableCollection<E> collection)
collection
- the set to use as the immutable set.protected 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 final String toString()
toString
in class ImmutableAbstractSet<E>
Copyright © 2014–2016 Delft University of Technology. All rights reserved.