T
- type of reduced valuespublic abstract class ReducingAggregateLoader<T> extends AbstractAggregateLoader<T> implements ValueReducer<T>
A base class for aggregate loaders that calculate values using only the specified part of subtree.
The part of subtree to use is defined by ReductionStrategy
, which is specified by type
parameter in
the attribute specification.
Here and in other classes, the process of combining the current value with values calculated for partial subtree into one value is called reduction.
This class:ValueReducer
,
ReductionStrategy
AttributeLoader.Aggregate<T>, AttributeLoader.AggregateContext<T>, AttributeLoader.Context, AttributeLoader.ForestIndependent<T>, AttributeLoader.Propagate<T>, AttributeLoader.PropagateContext<T>
mySpec
Constructor and Description |
---|
ReducingAggregateLoader(AttributeSpec<T> spec) |
Modifier and Type | Method and Description |
---|---|
protected abstract AttributeValue<T> |
getSelfValue(AttributeLoader.AggregateContext<T> context) |
AttributeValue<T> |
loadValue(List<AttributeValue<T>> childrenValues,
AttributeLoader.AggregateContext<T> context) |
firstChildError, getCachingStrategy, isEveryItemTypeSupported, isItemTypeSupported
getAttributeSpec
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert, merge, merge, reduce
getAttributeDependencies, getAttributeSpec
public ReducingAggregateLoader(AttributeSpec<T> spec)
public AttributeValue<T> loadValue(List<AttributeValue<T>> childrenValues, AttributeLoader.AggregateContext<T> context)
loadValue
in interface AttributeLoader.Aggregate<T>
@NotNull protected abstract AttributeValue<T> getSelfValue(AttributeLoader.AggregateContext<T> context)
Copyright © 2019 ALM Works. All Rights Reserved.