public class PersistentHashSet<E> extends AbstractUnmodSet<E> implements ImSet<E>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
PersistentHashSet.MutableHashSet<E> |
| Modifier and Type | Field and Description |
|---|---|
static PersistentHashSet<Object> |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object key)
Returns true if the set contains the given item.
|
static <E> PersistentHashSet<E> |
empty() |
static <E> PersistentHashSet<E> |
empty(Equator<E> eq) |
static <E> PersistentHashSet.MutableHashSet<E> |
emptyMutable()
Works around some type inference limitations of Java 8.
|
static <E> PersistentHashSet.MutableHashSet<E> |
emptyMutable(Equator<E> eq)
Works around some type inference limitations of Java 8.
|
Equator<E> |
equator()
Returns the Equator used by this set for equals comparisons and hashCodes
|
UnmodIterator<E> |
iterator()
Iterates over contents with no guarantees about their ordering.
|
PersistentHashSet.MutableHashSet<E> |
mutable()
Returns a mutable version of this immutable set.
|
static <E> PersistentHashSet<E> |
of(Iterable<E> elements)
Returns a new PersistentHashSet of the values.
|
static <E> PersistentHashSet<E> |
ofEq(Equator<E> eq,
Iterable<E> init) |
static <E> PersistentHashSet<E> |
ofMap(ImMap<E,?> map) |
PersistentHashSet<E> |
put(E o)
Adds an element, returning a modified version of the set (leaving the original set unchanged).
|
int |
size()
Returns the number of items in this collection or iterable.
|
PersistentHashSet<E> |
without(E key)
Removes this key from the set
|
equalshashCode, toStringclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAll, clear, containsAll, isEmpty, remove, removeAll, removeIf, retainAll, toArray, toArrayconcat, drop, dropWhile, filter, flatMap, fold, foldUntil, hash, head, map, precat, take, takeWhile, toStringtoImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSetequals, hashCode, spliteratorparallelStream, streampublic static final PersistentHashSet<Object> EMPTY
public static <E> PersistentHashSet<E> empty()
public static <E> PersistentHashSet.MutableHashSet<E> emptyMutable()
public static <E> PersistentHashSet<E> empty(Equator<E> eq)
public static <E> PersistentHashSet.MutableHashSet<E> emptyMutable(Equator<E> eq)
public static <E> PersistentHashSet<E> of(Iterable<E> elements)
StaticImports.set(Object...) If the input contains duplicate
elements, later values overwrite earlier ones.elements - The items to put into a vector.public static <E> PersistentHashSet<E> ofEq(Equator<E> eq, Iterable<E> init)
public static <E> PersistentHashSet<E> ofMap(ImMap<E,?> map)
public boolean contains(Object key)
UnmodSetpublic Equator<E> equator()
public PersistentHashSet<E> without(E key)
ImSetpublic PersistentHashSet<E> put(E o)
ImSetpublic UnmodIterator<E> iterator()
UnmodSetpublic int size()
SizedCopyright © 2019. All rights reserved.