Package org.organicdesign.fp.collections
Interface MutableSet<E>
-
- All Superinterfaces:
BaseSet<E>,java.util.Collection<E>,java.lang.Iterable<E>,java.util.Set<E>,Sized,Transformable<E>,UnmodCollection<E>,UnmodIterable<E>,UnmodSet<E>
- All Known Implementing Classes:
PersistentHashSet.MutableHashSet
public interface MutableSet<E> extends BaseSet<E>
Interface for mutable (hash) set builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ImSet<E>immutable()Returns an immutable version of this immutable set.MutableSet<E>put(E val)Adds an element.default MutableSet<E>union(java.lang.Iterable<? extends E> iter)Returns a new set containing all the items.MutableSet<E>without(E key)Removes this key from the set-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
-
-
-
-
Method Detail
-
put
MutableSet<E> put(E val)
Adds an element. If the element already exists in this set, the new value overwrites the old one. If the new element is the same as an old element (based on the address of that item in memory, not an equals test), the old set may be returned unchanged.
-
union
default MutableSet<E> union(java.lang.Iterable<? extends E> iter)
Returns a new set containing all the items.
-
-