public class NumberSumLoader extends SingleDependencyReducingAggregateLoader<Number>
myDependencymySpec| Constructor and Description |
|---|
NumberSumLoader(AttributeSpec<Number> spec,
AttributeSpec<Number> dependency) |
| Modifier and Type | Method and Description |
|---|---|
Number |
merge(Supplier<Number> self,
List<Number> list)
Calculates reduction of tree node where
self is value of the current row and list represents values passed from children (it
may be or be not values of children rows depending on strategy type). |
Number |
merge(Supplier<Number> self,
Supplier<Number> reduced)
Calculates reduction of tree node where
self is value of the current row, and reduced is result of flat reduction. |
Number |
reduce(List<Number> list)
Reduces the list of values to one value.
|
getAttributeDependencies, getSelfValueloadValuefirstChildErrorgetAttributeSpec, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconvertgetCachingStrategyisWholeForestDependent, preloadgetAttributeSpec, getContextDependencies, getGlobalTrailpublic NumberSumLoader(AttributeSpec<Number> spec, AttributeSpec<Number> dependency)
public Number reduce(@NotNull List<Number> list)
ValueReducermerge methods if not overridden. Can be called from convert methodlist - list of values, every item can be nullpublic Number merge(@NotNull Supplier<Number> self, @NotNull Supplier<Number> reduced)
ValueReducerself is value of the current row, and reduced is result of flat reduction. Value
modifications can be done here if one wants to build reduction that computes value based on depth in the structure. Called from strict subtree
reduction strategy or from other merge method if not optimized.public Number merge(Supplier<Number> self, List<Number> list)
ValueReducerself is value of the current row and list represents values passed from children (it
may be or be not values of children rows depending on strategy type). Value modifications can be done here if one wants to build reduction
that computes value based on depth in the structure. Called from full subtree reduction strategy, that is default and the most frequently
used strategy for most reducing aggregates (it makes this method the most probable target for optimization).Copyright © 2021 ALM Works. All Rights Reserved.