Class ObjectStatisticsDataProvider.IncreaseCalculator
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.jdk.dataproviders.ObjectStatisticsDataProvider.IncreaseCalculator
-
- All Implemented Interfaces:
IItemConsumer<ObjectStatisticsDataProvider.IncreaseCalculator>,Combinable<ObjectStatisticsDataProvider.IncreaseCalculator>
- Enclosing class:
- ObjectStatisticsDataProvider
private static class ObjectStatisticsDataProvider.IncreaseCalculator extends java.lang.Object implements IItemConsumer<ObjectStatisticsDataProvider.IncreaseCalculator>, Combinable<ObjectStatisticsDataProvider.IncreaseCalculator>
-
-
Constructor Summary
Constructors Constructor Description IncreaseCalculator(IMemberAccessor<IQuantity,IItem> xAccessor, IMemberAccessor<IQuantity,IItem> yAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidadd(IQuantity x, IQuantity y)ObjectStatisticsDataProvider.IncreaseCalculatorcombineWith(ObjectStatisticsDataProvider.IncreaseCalculator other)Combine this object with another object if it is possible and return a combined object.voidconsume(IItem item)Consumes another item.ObjectStatisticsDataProvider.IncreaseCalculatormerge(ObjectStatisticsDataProvider.IncreaseCalculator other)Merges this object with the supplied object.
-
-
-
Field Detail
-
xAccessor
private final IMemberAccessor<IQuantity,IItem> xAccessor
-
yAccessor
private final IMemberAccessor<IQuantity,IItem> yAccessor
-
minX
private IQuantity minX
-
yAtMinX
private IQuantity yAtMinX
-
maxX
private IQuantity maxX
-
yAtMaxX
private IQuantity yAtMaxX
-
-
Constructor Detail
-
IncreaseCalculator
IncreaseCalculator(IMemberAccessor<IQuantity,IItem> xAccessor, IMemberAccessor<IQuantity,IItem> yAccessor)
-
-
Method Detail
-
consume
public void consume(IItem item)
Description copied from interface:IItemConsumerConsumes another item.- Specified by:
consumein interfaceIItemConsumer<ObjectStatisticsDataProvider.IncreaseCalculator>
-
merge
public ObjectStatisticsDataProvider.IncreaseCalculator merge(ObjectStatisticsDataProvider.IncreaseCalculator other)
Description copied from interface:IItemConsumerMerges this object with the supplied object. Normally this is another item consumer of the same type and the output result is a consumer with an internal state that reflects the state of both the current consumer and the input value.- Specified by:
mergein interfaceIItemConsumer<ObjectStatisticsDataProvider.IncreaseCalculator>- Parameters:
other- another instance to merge with- Returns:
- the merged instance
-
combineWith
public ObjectStatisticsDataProvider.IncreaseCalculator combineWith(ObjectStatisticsDataProvider.IncreaseCalculator other)
Description copied from interface:CombinableCombine this object with another object if it is possible and return a combined object. This method may determine that it is not possible to combine the objects and returnnullin that case.- Specified by:
combineWithin interfaceCombinable<ObjectStatisticsDataProvider.IncreaseCalculator>- Parameters:
other- an object to combine this object with- Returns:
- a combined object, or
nullif the objects shouldn't be combined
-
-