net.degreedays.api.data
Class Breakdown

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

public abstract class Breakdown
extends java.lang.Object

Defines how a set of degree days should be broken down (e.g. daily, weekly, or monthly), and the period in time they should cover.

To create a Breakdown object, see the static factory methods on the DatedBreakdown and AverageBreakdown subclasses.

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
 boolean equals(java.lang.Object obj)
          Two Breakdown objects are equal if they have the same class and the same configuration.
abstract  DayRange getFullRangeOrNull(DayRange availableDataRange)
          Returns the range of days that this breakdown would cover given source data covering availableDataRange, or null if availableDataRange would not be enough for this breakdown.
 int hashCode()
          Overridden to ensure consistency with equals.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFullRangeOrNull

public abstract DayRange getFullRangeOrNull(DayRange availableDataRange)
Returns the range of days that this breakdown would cover given source data covering availableDataRange, or null if availableDataRange would not be enough for this breakdown.

Parameters:
availableDataRange - the non-null range of temperature data available (or the available range of daily degree-day data if summing daily degree days into a different breakdown).
Throws:
java.lang.NullPointerException - if availableDataRange is null.

equals

public final boolean equals(java.lang.Object obj)
Two Breakdown objects are equal if they have the same class and the same configuration.

Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overridden to ensure consistency with equals.

Overrides:
hashCode in class java.lang.Object


www.degreedays.net/api/