Package org.openjdk.jmc.common.item
Interface IAggregator<V,C extends IItemConsumer<C>>
-
- Type Parameters:
V
- the type of the calculation resultC
- An item consumer type. SeeIItemConsumer
about the self referring extends definition. Only really important when implementing this interface. When handling aggregator instances you can usually use?
.
- All Superinterfaces:
IDescribable
,IItemConsumerFactory<C>
- All Known Implementing Classes:
Aggregators.AdvancedMaxAggregator
,Aggregators.AdvancedMinAggregator
,Aggregators.AggregatorBase
,Aggregators.Avg
,Aggregators.FieldAggregatorBase
,Aggregators.MergingAggregator
,Aggregators.MinMax
,Aggregators.Stddev
,Aggregators.Sum
,Aggregators.Variance
public interface IAggregator<V,C extends IItemConsumer<C>> extends IItemConsumerFactory<C>, IDescribable
Encapsulates the calculation of an aggregate for (potentially) different types of items. Basically this is a combination ofIItemConsumerFactory
that createsIItemConsumer
s which consumes input items and calculates intermediate values,IValueBuilder
which maps from the IItemConsumer intermediate values to the output value, andIDescribable
which provides human readable descriptions about the output value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
getValue(S source)
IType<? super V>
getValueType()
-
Methods inherited from interface org.openjdk.jmc.common.IDescribable
getDescription, getName
-
Methods inherited from interface org.openjdk.jmc.common.item.IItemConsumerFactory
acceptType, newItemConsumer
-
-
-
-
Method Detail
-
getValueType
IType<? super V> getValueType()
- Returns:
- The type for the value
-
getValue
V getValue(S source)
- Parameters:
source
- the source to build the value from- Returns:
- the constructed value
-
-