- java.lang.Object
-
- swim.structure.collections.ValueMap<K,V>
-
- swim.structure.collections.ValueIterableMap<K,V>
-
- swim.structure.collections.ValueOrderedMap<K,V>
-
- swim.structure.collections.ValueReducedMap<K,V,U>
-
- All Implemented Interfaces:
Iterable<Map.Entry<K,V>>
,Map<K,V>
,SortedMap<K,V>
,IterableMap<K,V>
,OrderedMap<K,V>
,ReducedMap<K,V,U>
public class ValueReducedMap<K,V,U> extends ValueOrderedMap<K,V> implements ReducedMap<K,V,U>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReducedMap<Value,Value,Value>
inner()
<K2> ValueReducedMap<K2,V,U>
keyClass(Class<K2> keyClass)
<K2> ValueReducedMap<K2,V,U>
keyForm(Form<K2> keyForm)
U
reduced(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)
Returns the reduction of thisReducedMap
, combining all contained elements with the givenaccumulator
andcombiner
functions, recomputing only what has changed since the last invocation ofreduced
.<U2> ValueReducedMap<K,V,U2>
reducedClass(Class<U2> reducedClass)
Form<U>
reducedForm()
<U2> ValueReducedMap<K,V,U2>
reducedForm(Form<U2> reducedForm)
<V2> ValueReducedMap<K,V2,U>
valueClass(Class<V2> valueClass)
<V2> ValueReducedMap<K,V2,U>
valueForm(Form<V2> valueForm)
-
Methods inherited from class swim.structure.collections.ValueOrderedMap
comparator, firstEntry, firstKey, firstValue, getEntry, getIndex, headMap, indexOf, iterator, lastEntry, lastKey, lastValue, nextEntry, nextKey, nextValue, previousEntry, previousKey, previousValue, subMap, tailMap
-
Methods inherited from class swim.structure.collections.ValueIterableMap
keyIterator, valueIterator
-
Methods inherited from class swim.structure.collections.ValueMap
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keyForm, keySet, put, putAll, remove, size, toString, valueForm, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
inner
public ReducedMap<Value,Value,Value> inner()
- Overrides:
inner
in classValueOrderedMap<K,V>
-
keyForm
public <K2> ValueReducedMap<K2,V,U> keyForm(Form<K2> keyForm)
- Overrides:
keyForm
in classValueOrderedMap<K,V>
-
keyClass
public <K2> ValueReducedMap<K2,V,U> keyClass(Class<K2> keyClass)
- Overrides:
keyClass
in classValueOrderedMap<K,V>
-
valueForm
public <V2> ValueReducedMap<K,V2,U> valueForm(Form<V2> valueForm)
- Overrides:
valueForm
in classValueOrderedMap<K,V>
-
valueClass
public <V2> ValueReducedMap<K,V2,U> valueClass(Class<V2> valueClass)
- Overrides:
valueClass
in classValueOrderedMap<K,V>
-
reducedForm
public <U2> ValueReducedMap<K,V,U2> reducedForm(Form<U2> reducedForm)
-
reducedClass
public <U2> ValueReducedMap<K,V,U2> reducedClass(Class<U2> reducedClass)
-
reduced
public U reduced(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)
Description copied from interface:ReducedMap
Returns the reduction of thisReducedMap
, combining all contained elements with the givenaccumulator
andcombiner
functions, recomputing only what has changed since the last invocation ofreduced
. Stores partial computations to accelerate repeated reduction of continuously mutating datasets.- Specified by:
reduced
in interfaceReducedMap<K,V,U>
-
-