Class TimePeriodAveragingCollater
- java.lang.Object
-
- com.atlassian.bamboo.charts.timeperiod.AbstractTimePeriodCollater
-
- com.atlassian.bamboo.clover.charts.collater.TimePeriodAveragingCollater
-
- All Implemented Interfaces:
TimePeriodCollater
- Direct Known Subclasses:
TimePeriodCoverageCollater
,TimePeriodLOCCollater
,TimePeriodNCLOCCollater
public abstract class TimePeriodAveragingCollater extends AbstractTimePeriodCollater implements TimePeriodCollater
Base class which collects values from build results from a specified metadata key, by summing them and next dividing by count. An averaging collater is being used here, because in case there is more than one build result in the specified time period, an average value is be returned.
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.charts.timeperiod.AbstractTimePeriodCollater
period, seriesName
-
-
Constructor Summary
Constructors Constructor Description TimePeriodAveragingCollater()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addResult(ResultStatisticsProvider result)
abstract boolean
countSuccessfulBuildsOnly()
Whether results from successful or all builds should be considered.abstract String
getMetaDataKey()
A meta data key to be summed up.double
getValue()
-
Methods inherited from class com.atlassian.bamboo.charts.timeperiod.AbstractTimePeriodCollater
getPeriod, getSeriesName, setPeriod, setSeriesName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.charts.collater.TimePeriodCollater
getPeriod, getSeriesName, setPeriod, setSeriesName
-
-
-
-
Method Detail
-
getMetaDataKey
public abstract String getMetaDataKey()
A meta data key to be summed up.- Returns:
- String key name
-
countSuccessfulBuildsOnly
public abstract boolean countSuccessfulBuildsOnly()
Whether results from successful or all builds should be considered.- Returns:
- boolean true for successful only, false for all builds
-
addResult
public void addResult(ResultStatisticsProvider result)
- Specified by:
addResult
in interfaceTimePeriodCollater
-
getValue
public double getValue()
- Specified by:
getValue
in interfaceTimePeriodCollater
-
-