IDiffSet.Durable<V>
ISet.Mixin<V>
hash
Constructor and Description |
---|
DiffSet(IMap<V,?> underlying) |
DiffSet(ISet<V> underlying) |
Modifier and Type | Method and Description |
---|---|
ISet<V> |
add(V value) |
IDiffMap<V,Void> |
diffMap() |
DiffSet<V> |
forked()
This returns a data structure which is forked, which is equivalent to Clojure's persistent
data structures, also sometimes called functional or immutable.
|
boolean |
isLinear() |
DiffSet<V> |
linear()
This returns a data structure which is linear, or temporarily mutable.
|
IDiffSet<V> |
rebase(IMap<V,Void> newUnderlying)
Returns a new diff, which is rebased atop the new underlying collection.
|
ISet<V> |
remove(V value) |
clone, equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, elements, indexOf, nth, size, underlying, valueEquality, valueHash
contains, containsAll, containsAll, containsAny, containsAny, diff, difference, intersection, iterator, sliceIndices, split, spliterator, stream, test, toArray, toArray, toSet, union, zip
iterator, nth, save
public IDiffSet<V> rebase(IMap<V,Void> newUnderlying)
IDiff
a.rebase(b).rebase(c)
is not necessarily equivalent to a.rebase(c)
.public boolean isLinear()
public DiffSet<V> forked()
ICollection
If only a single function or scope uses the data structure, it can be left as a linear data structure, which can have significant performance benefits.
If the data structure is already forked, it will simply return itself.
public DiffSet<V> linear()
ICollection
If ICollection.forked()
is called on a linear collection, all references to that linear collection
should be discarded.
If the data structure is already linear, it will simply return itself.