IDiffMap.Durable<K,V>
IMap.Mixin<K,V>
hash
Modifier and Type | Method and Description |
---|---|
IMap<K,V> |
added()
Entries which have been added to the underlying data structure, some of which may shadow underlying entries.
|
DiffMap<K,V> |
clone() |
DiffMap<K,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() |
DiffMap<K,V> |
linear()
This returns a data structure which is linear, or temporarily mutable.
|
DiffMap<K,V> |
put(K key,
V value,
BinaryOperator<V> merge) |
IDiffMap<K,V> |
rebase(IMap<K,V> newUnderlying)
Returns a new diff, which is rebased atop the new underlying collection.
|
DiffMap<K,V> |
remove(K key) |
ISortedSet<Long> |
removedIndices()
Indices which have been removed or shadowed from the underlying data structure.
|
IMap<K,V> |
underlying()
The baseline data structure.
|
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
indexOf, iterator, keyEquality, keyHash, nth, save, size
apply, contains, containsAll, containsAll, containsAny, containsAny, diff, difference, difference, entries, equals, get, get, getOrCreate, hashSortedEntries, intersection, intersection, iterator, keys, mapValues, merge, put, sliceIndices, split, spliterator, stream, toMap, union, update, values
nth
public IDiffMap<K,V> rebase(IMap<K,V> newUnderlying)
IDiff
a.rebase(b).rebase(c)
is not necessarily equivalent to a.rebase(c)
.public boolean isLinear()
public DiffMap<K,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 DiffMap<K,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.
public IMap<K,V> underlying()
IDiffMap
underlying
in interface IDiff<IMap<K,V>>
underlying
in interface IDiffMap<K,V>
public IMap<K,V> added()
IDiffMap
public ISortedSet<Long> removedIndices()
IDiffMap
removedIndices
in interface IDiffMap<K,V>