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

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.reducer.util.IntervalUtility

public class IntervalUtility
extends java.lang.Object

Provides utility functions for processing Intervals.

Author:
(Cedric) Qin Zhang, Philip Johnson

Nested Class Summary
static class IntervalUtility.Period
          Provides a Time period, which is either day, week or month.
 
Constructor Summary
IntervalUtility()
           
 
Method Summary
static java.util.List<IntervalUtility.Period> getPeriods(org.hackystat.utilities.time.interval.Interval interval)
          Gets time periods in the interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalUtility

public IntervalUtility()
Method Detail

getPeriods

public static java.util.List<IntervalUtility.Period> getPeriods(org.hackystat.utilities.time.interval.Interval interval)
                                                         throws org.hackystat.utilities.time.interval.IllegalIntervalException
Gets time periods in the interval.

Parameters:
interval - The interval.
Returns:
A ordered list of IntervalUtility.Period objects.
Throws:
org.hackystat.utilities.time.interval.IllegalIntervalException - If the interval is not recognized.