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 void
add(IQuantity x, IQuantity y)
ObjectStatisticsDataProvider.IncreaseCalculator
combineWith(ObjectStatisticsDataProvider.IncreaseCalculator other)
Combine this object with another object if it is possible and return a combined object.void
consume(IItem item)
Consumes another item.ObjectStatisticsDataProvider.IncreaseCalculator
merge(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:IItemConsumer
Consumes another item.- Specified by:
consume
in interfaceIItemConsumer<ObjectStatisticsDataProvider.IncreaseCalculator>
-
merge
public ObjectStatisticsDataProvider.IncreaseCalculator merge(ObjectStatisticsDataProvider.IncreaseCalculator other)
Description copied from interface:IItemConsumer
Merges 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:
merge
in 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:Combinable
Combine 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 returnnull
in that case.- Specified by:
combineWith
in interfaceCombinable<ObjectStatisticsDataProvider.IncreaseCalculator>
- Parameters:
other
- an object to combine this object with- Returns:
- a combined object, or
null
if the objects shouldn't be combined
-
-