Interface StatisticGatherer

All Known Implementing Classes:
StatisticGatherer.CountUnique, StatisticGatherer.Mean, StatisticGatherer.Median, StatisticGatherer.Sum

public interface StatisticGatherer

A simple way of calculating statistics


Nested Class Summary
static class StatisticGatherer.CountUnique
static class StatisticGatherer.CountUniqueValue
static class StatisticGatherer.Mean
static class StatisticGatherer.MeanValue
          Using some trickiness - we extend Number so that we can call StatisticGatherer.MeanValue.intValue() without having to change all the client code
static class StatisticGatherer.Median
static class StatisticGatherer.MedianValue
static class StatisticGatherer.Sum
Method Summary
 Number getValue(Number current, int newValue)
          Returns current value.

Method Detail


Number getValue(Number current,
                int newValue)
Returns current value. If null, the return value will be the 0.

current - The current value. If null, the return value will be the equivalent of 0
newValue - The value to add to the current
The new value - guaranteed not to be null

Copyright © 2002-2014 Atlassian. All Rights Reserved.