Package org.openjdk.jmc.common.item
Class Aggregators.AdvancedMinMaxAggregator<V,T extends java.lang.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.AdvancedMinMaxAggregator<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>>
,IValueBuilder<V,java.util.Iterator<Aggregators.AdvancedMinMaxConsumer<V,T>>>
- Direct Known Subclasses:
Aggregators.AdvancedMaxAggregator
,Aggregators.AdvancedMinAggregator
- Enclosing class:
- Aggregators
private static class Aggregators.AdvancedMinMaxAggregator<V,T extends java.lang.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 first or last event from a collection of events.
-
-
Field Summary
Fields Modifier and Type Field Description private IAttribute<V>
attribute
private IAttribute<T>
comparator
private boolean
max
-
Constructor Summary
Constructors Constructor Description AdvancedMinMaxAggregator(java.lang.String name, java.lang.String description, IAttribute<V> attribute, IAttribute<T> comparator, boolean max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IMemberAccessor<? extends V,IItem>
doGetAccessor(IType<IItem> type)
V
getValue(Aggregators.AdvancedMinMaxConsumer<V,T> consumer)
Aggregators.AdvancedMinMaxConsumer<V,T>
newItemConsumer(IType<IItem> type)
-
Methods inherited from class org.openjdk.jmc.common.item.Aggregators.FieldAggregatorBase
acceptType, getAccessor
-
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
-
-
-
-
Field Detail
-
max
private final boolean max
-
attribute
private final IAttribute<V> attribute
-
comparator
private final IAttribute<T extends java.lang.Comparable<T>> comparator
-
-
Constructor Detail
-
AdvancedMinMaxAggregator
public AdvancedMinMaxAggregator(java.lang.String name, java.lang.String description, IAttribute<V> attribute, IAttribute<T> comparator, boolean max)
-
-
Method Detail
-
newItemConsumer
public Aggregators.AdvancedMinMaxConsumer<V,T> newItemConsumer(IType<IItem> type)
- Parameters:
type
- an item type to get an item consumer for- Returns:
- a new item consumer for the supplied type
-
getValue
public V getValue(Aggregators.AdvancedMinMaxConsumer<V,T> consumer)
- Specified by:
getValue
in classAggregators.MergingAggregator<V,Aggregators.AdvancedMinMaxConsumer<V,T extends java.lang.Comparable<T>>>
-
doGetAccessor
protected IMemberAccessor<? extends V,IItem> doGetAccessor(IType<IItem> type)
- Specified by:
doGetAccessor
in classAggregators.FieldAggregatorBase<V,Aggregators.AdvancedMinMaxConsumer<V,T extends java.lang.Comparable<T>>>
-
-