public static final class PersistentHashSet.MutableHashSet<E> extends UnmodSet.AbstractUnmodSet<E> implements MutableUnsortedSet<E>
UnmodSet.AbstractUnmodSet<T>
UnmodIterable.AbstractUnmodIterable<T>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object key)
Returns true if the set contains the given item.
|
PersistentHashSet<E> |
immutable()
Returns a immutable version of this (maybe mutable) set.
|
UnmodIterator<E> |
iterator()
Iterates over contents with no guarantees about their ordering.
|
PersistentHashSet.MutableHashSet<E> |
put(E val)
Adds an element, returning a modified version of the set (leaving the original set unchanged).
|
int |
size()
Returns the number of items in this iterable.
|
PersistentHashSet.MutableHashSet<E> |
without(E key)
Removes the given item, returning a modified version of the set (leaving the original set
unchanged).
|
equals
hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
mutable, union
add, addAll, clear, containsAll, isEmpty, remove, removeAll, removeIf, retainAll, toArray, toArray
concat, drop, filter, flatMap, foldLeft, foldLeft, hash, hashCode, head, map, precat, take, takeWhile, toString
toImList, toImMap, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableSet, toMutableSortedMap, toMutableSortedSet
equals, hashCode, spliterator
parallelStream, stream
public int size()
Sized
public PersistentHashSet.MutableHashSet<E> put(E val)
MutableUnsortedSet
put
in interface ImSet<E>
put
in interface ImUnsortedSet<E>
put
in interface MutableUnsortedSet<E>
val
- the element to add to this setpublic UnmodIterator<E> iterator()
UnmodSet
public boolean contains(Object key)
UnmodSet
public PersistentHashSet.MutableHashSet<E> without(E key)
MutableUnsortedSet
without
in interface ImSet<E>
without
in interface ImUnsortedSet<E>
without
in interface MutableUnsortedSet<E>
public PersistentHashSet<E> immutable()
ImUnsortedSet
immutable
in interface ImUnsortedSet<E>
Copyright © 2016. All rights reserved.