Package org.openjdk.jmc.common.item
Class Aggregators.AdvancedMaxAggregator<V,T extends Comparable<T>>
java.lang.Object
org.openjdk.jmc.common.item.Aggregators.AggregatorBase<V,C>
org.openjdk.jmc.common.item.Aggregators.MergingAggregator<V,C>
org.openjdk.jmc.common.item.Aggregators.FieldAggregatorBase<V,Aggregators.AdvancedMinMaxConsumer<V,T>>
org.openjdk.jmc.common.item.Aggregators.AdvancedMaxAggregator<V,T>
- Type Parameters:
V
- the return value type, for examplejava.lang.String
T
- the value type for the ordering
- All Implemented Interfaces:
IDescribable
,IAggregator<V,
,Aggregators.AdvancedMinMaxConsumer<V, T>> IItemConsumerFactory<Aggregators.AdvancedMinMaxConsumer<V,
T>>
- Enclosing class:
- Aggregators
public static class Aggregators.AdvancedMaxAggregator<V,T extends Comparable<T>>
extends Aggregators.FieldAggregatorBase<V,Aggregators.AdvancedMinMaxConsumer<V,T>>
This aggregator separates the attribute for which to do the ordering from the attribute to
use for accessing the value. It is typically used for getting a specific value from the last
event from a collection of events.
For example:
AdvancedMaxAggregator<String, IQuantity> aggregator = new
AdvancedMaxAggregator(myFavouriteAttribute, endTimeAttribute);
-
Constructor Summary
ConstructorsConstructorDescriptionAdvancedMaxAggregator
(String name, String description, IAttribute<V> attribute, IAttribute<T> comparator) -
Method Summary
Modifier and TypeMethodDescriptionprotected IMemberAccessor<? extends V,
IItem> doGetAccessor
(IType<IItem> type) getValue
(Aggregators.AdvancedMinMaxConsumer<V, T> consumer) newItemConsumer
(IType<IItem> type) Methods inherited from class org.openjdk.jmc.common.item.Aggregators.FieldAggregatorBase
acceptType
Methods inherited from class org.openjdk.jmc.common.item.Aggregators.MergingAggregator
getValue
Methods inherited from class org.openjdk.jmc.common.item.Aggregators.AggregatorBase
getDescription, getName, getValueType
-
Constructor Details
-
AdvancedMaxAggregator
public AdvancedMaxAggregator(String name, String description, IAttribute<V> attribute, IAttribute<T> comparator)
-
-
Method Details
-
newItemConsumer
- Parameters:
type
- an item type to get an item consumer for- Returns:
- a new item consumer for the supplied type
-
getValue
- Specified by:
getValue
in classAggregators.MergingAggregator<V,
Aggregators.AdvancedMinMaxConsumer<V, T extends Comparable<T>>>
-
doGetAccessor
- Specified by:
doGetAccessor
in classAggregators.FieldAggregatorBase<V,
Aggregators.AdvancedMinMaxConsumer<V, T extends Comparable<T>>>
-