V - the return value type, for example java.lang.StringT - the value type for the orderingpublic static class Aggregators.AdvancedMinMaxConsumer<V,T extends Comparable<T>> extends Object implements IItemConsumer<Aggregators.AdvancedMinMaxConsumer<V,T>>
| Constructor and Description |
|---|
AdvancedMinMaxConsumer(IMemberAccessor<? extends V,IItem> valueAccessor,
IMemberAccessor<T,IItem> comparatorAccessor,
boolean max) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(IItem newItem)
Consumes another item.
|
V |
getValue() |
Aggregators.AdvancedMinMaxConsumer<V,T> |
merge(Aggregators.AdvancedMinMaxConsumer<V,T> other)
Merges this object with the supplied object.
|
public AdvancedMinMaxConsumer(IMemberAccessor<? extends V,IItem> valueAccessor, IMemberAccessor<T,IItem> comparatorAccessor, boolean max)
valueAccessor - the accessor for retrieving the valuecomparatorAccessor - the accessor for retrieving the value to use for comparisonsmax - whether to use the smallest value, or the greatestpublic void consume(IItem newItem)
IItemConsumerconsume in interface IItemConsumer<Aggregators.AdvancedMinMaxConsumer<V,T extends Comparable<T>>>public Aggregators.AdvancedMinMaxConsumer<V,T> merge(Aggregators.AdvancedMinMaxConsumer<V,T> other)
IItemConsumermerge in interface IItemConsumer<Aggregators.AdvancedMinMaxConsumer<V,T extends Comparable<T>>>other - another instance to merge withpublic V getValue()
Copyright © 2019. All rights reserved.