-
- All Superinterfaces:
Iterable<Map.Entry<K,V>>,IterableMap<K,V>,Map<K,V>,OrderedMap<K,V>,SortedMap<K,V>
- All Known Implementing Classes:
BTreeMap,BTreeMap,ValueReducedMap
public interface ReducedMap<K,V,U> extends OrderedMap<K,V>
AnOrderedMapthat memoizes partial combinations of sub-elements to support efficient, incremental reduction of continuously mutating datasets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Ureduced(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)Returns the reduction of thisReducedMap, combining all contained elements with the givenaccumulatorandcombinerfunctions, recomputing only what has changed since the last invocation ofreduced.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from interface swim.util.OrderedMap
clear, comparator, containsKey, containsValue, entrySet, firstEntry, firstKey, firstValue, get, getEntry, getIndex, headMap, indexOf, isEmpty, iterator, keyIterator, keySet, lastEntry, lastKey, lastValue, nextEntry, nextKey, nextValue, previousEntry, previousKey, previousValue, put, putAll, remove, size, subMap, tailMap, valueIterator, values
-
-
-
-
Method Detail
-
reduced
U reduced(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)
Returns the reduction of thisReducedMap, combining all contained elements with the givenaccumulatorandcombinerfunctions, recomputing only what has changed since the last invocation ofreduced. Stores partial computations to accelerate repeated reduction of continuously mutating datasets.
-
-