public static final class UpdateFunction.Simple<V> extends java.lang.Object implements UpdateFunction<V,V>
UpdateFunction.Simple<V>noOp| Constructor and Description |
|---|
Simple(java.util.function.BiFunction<V,V,V> wrapped) |
| Modifier and Type | Method and Description |
|---|---|
V |
insert(V v)
Computes the value that should be inserted in the BTree.
|
V |
merge(V replacing,
V update)
Computes the result of merging the existing value with the one from the update.
|
static <V> UpdateFunction.Simple<V> |
of(java.util.function.BiFunction<V,V,V> f) |
void |
onAllocatedOnHeap(long heapSize) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnoOppublic V insert(V v)
UpdateFunctioninsert in interface UpdateFunction<V,V>v - the update valuepublic V merge(V replacing, V update)
UpdateFunctionmerge in interface UpdateFunction<V,V>replacing - the value in the original tree we have matchedupdate - the value in the updating collection that matchedpublic void onAllocatedOnHeap(long heapSize)
onAllocatedOnHeap in interface UpdateFunction<V,V>heapSize - extra heap space allocated (over previous tree)public static <V> UpdateFunction.Simple<V> of(java.util.function.BiFunction<V,V,V> f)
Copyright © 2009-2022 The Apache Software Foundation