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.
  • Constructor Details

    • TimePeriodAveragingCollater

      public TimePeriodAveragingCollater()
  • Method Details

    • 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 interface TimePeriodCollater
    • getValue

      public double getValue()
      Specified by:
      getValue in interface TimePeriodCollater