net.degreedays.api.data
Class AverageBreakdown

java.lang.Object
  extended by net.degreedays.api.data.Breakdown
      extended by net.degreedays.api.data.AverageBreakdown
Direct Known Subclasses:
FullYearsAverageBreakdown

public abstract class AverageBreakdown
extends Breakdown

Defines how a set of average degree days should be broken down, including the period in time they should cover.

This is the abstract superclass of the types of Breakdown that can be taken by an AverageDataSpec.

To create an AverageBreakdown object use the fullYears(net.degreedays.api.data.Period) static factory method. For example:

 AverageBreakdown fiveYearAverage = 
     AverageBreakdown.fullYears(Period.latestValues(5));
 

See Also:
DatedBreakdown

This abstract class is not designed to be extended by third-party code, which is why it does not have an accessible constructor.

All concrete subclasses of this abstract class are immutable. You can safely reuse them and call them from multiple threads at once.


Method Summary
static FullYearsAverageBreakdown fullYears(Period period)
          Returns a non-null FullYearsAverageBreakdown object that specifies average degree days derived from data covering full calendar years determined by the specified period.
 
Methods inherited from class net.degreedays.api.data.Breakdown
equals, getFullRangeOrNull, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fullYears

public static FullYearsAverageBreakdown fullYears(Period period)
Returns a non-null FullYearsAverageBreakdown object that specifies average degree days derived from data covering full calendar years determined by the specified period.

Parameters:
period - specifies the full calendar years of data that the average figures should be derived from. Cannot be null. Typically you'd want to use Period.latestValues(int) for this, specifying at least 2 values (since an average of 1 year of data is not very meaningful). But you can also use Period.dayRange(net.degreedays.time.DayRange) - in this case the period may be widened for calculation purposes to make it cover full calendar years.
Throws:
java.lang.NullPointerException - if period is null.


www.degreedays.net/api/