org.hackystat.telemetry.analyzer.reducer.util
Class IntervalUtility.Period

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.reducer.util.IntervalUtility.Period
Enclosing class:
IntervalUtility

public static class IntervalUtility.Period
extends java.lang.Object

Provides a Time period, which is either day, week or month.

Author:
(Cedric) Qin Zhang.

Constructor Summary
IntervalUtility.Period(org.hackystat.utilities.time.period.Day day)
          Constructs this instance from day.
IntervalUtility.Period(org.hackystat.utilities.time.period.Month month)
          Constructs this instance from month.
IntervalUtility.Period(org.hackystat.utilities.time.period.Week week)
          Constructs this instance from week.
 
Method Summary
 org.hackystat.utilities.time.period.Day getEndDay()
          Gets the end day of the period, inclusive.
 int getNumOfDays()
          Gets the number of day in this period, including both start day and end day.
 org.hackystat.utilities.time.period.Day getStartDay()
          Gets the start day of the period, inclusive.
 org.hackystat.utilities.time.period.TimePeriod getTimePeriod()
          Gets the time period wrapped by this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalUtility.Period

public IntervalUtility.Period(org.hackystat.utilities.time.period.Day day)
Constructs this instance from day.

Parameters:
day - The day.

IntervalUtility.Period

public IntervalUtility.Period(org.hackystat.utilities.time.period.Week week)
Constructs this instance from week.

Parameters:
week - The week.

IntervalUtility.Period

public IntervalUtility.Period(org.hackystat.utilities.time.period.Month month)
Constructs this instance from month.

Parameters:
month - The month.
Method Detail

getTimePeriod

public org.hackystat.utilities.time.period.TimePeriod getTimePeriod()
Gets the time period wrapped by this instance.

Returns:
The wrapped TimePeriod object.

getStartDay

public org.hackystat.utilities.time.period.Day getStartDay()
Gets the start day of the period, inclusive.

Returns:
The start day.

getEndDay

public org.hackystat.utilities.time.period.Day getEndDay()
Gets the end day of the period, inclusive.

Returns:
The start day.

getNumOfDays

public int getNumOfDays()
Gets the number of day in this period, including both start day and end day.

Returns:
The number of days.