Click or drag to resize
DatedBreakdown Class
Defines how a set of dated degree days should be broken down, including the period in time they should cover.
Inheritance Hierarchy

Namespace: DegreeDays.Api.Data
Assembly: DegreeDaysApi (in DegreeDaysApi.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
public abstract class DatedBreakdown : Breakdown

The DatedBreakdown type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDaily
Returns a non-null DailyBreakdown object that specifies daily degree days covering the specified period in time.
Public methodEquals
Two Breakdown objects are equal if they have the same class and the same configuration.
(Inherited from Breakdown.)
Public methodGetHashCode
Overridden to ensure consistency with Equals.
(Inherited from Breakdown.)
Public methodStatic memberMonthly(Period)
Returns a non-null MonthlyBreakdown object that specifies monthly degree days covering the specified period in time and broken down according to regular calendar months.
Public methodStatic memberMonthly(Period, StartOfMonth)
Returns a non-null MonthlyBreakdown object that specifies monthly degree days covering the specified period in time, with each "month" starting on the specified day of the month.
Public methodStatic memberWeekly
Returns a non-null WeeklyBreakdown object that specifies weekly degree days covering the specified period in time, with each "week" starting on the specified day of the week.
Public methodStatic memberYearly(Period)
Returns a non-null YearlyBreakdown object that specifies yearly degree days covering the specified period in time and broken down according to regular calendar years.
Public methodStatic memberYearly(Period, StartOfYear)
Returns a non-null YearlyBreakdown object that specifies yearly degree days covering the specified period in time, with each "year" starting on the specified day of the year.
Top
Remarks

This is the abstract superclass of the types of Breakdown that can be taken by a DatedDataSpec.

To create a DatedBreakdown object you can use the static factory methods of this class. For example:

DatedBreakdown dailyBreakdownOverLast30Days = 
    DatedBreakdown.Daily(Period.LatestValues(30));

DatedBreakdown weeklyBreakdownFor2010WithWeeksStartingOnMonday = 
    DatedBreakdown.Weekly(
        Period.DayRange(new Day(2010, 1, 1).To(new Day(2010, 12, 31))),
        DayOfWeek.Monday);

DatedBreakdown monthlyBreakdownOverLast12Months = 
    DatedBreakdown.Monthly(Period.LatestValues(12));

DatedBreakdown yearlyBreakdownOverLast5Years =
    DatedBreakdown.Yearly(Period.LatestValues(5));

As you can see from the above examples, defining the Period is an important part of defining a DatedBreakdown. See that class for more information on the relevant options.

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

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