org.dasein.util
Class TimeWindow

java.lang.Object
  extended by org.dasein.util.TimeWindow
All Implemented Interfaces:
Iterable<TimePeriod>

public class TimeWindow
extends Object
implements Iterable<TimePeriod>


Constructor Summary
TimeWindow()
           
TimeWindow(EnumSet<DayOfWeek> days, int startHour, int startMinute, int endHour, int endMinute)
           
 
Method Summary
 EnumSet<DayOfWeek> getDaysOfWeek()
           
 long getDuration()
           
 int getEndHour()
           
 int getEndMinute()
           
 Iterable<TimePeriod> getNextPeriods(int numPeriods)
           
 Iterable<TimePeriod> getNextPeriods(long startingTimestamp, int numPeriods)
           
 int getStartHour()
           
 int getStartMinute()
           
 boolean isInWindow()
           
 boolean isInWindow(long atTimestamp)
           
 Iterator<TimePeriod> iterator()
           
 String toString()
           
static TimeWindow valueOf(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeWindow

public TimeWindow()

TimeWindow

public TimeWindow(EnumSet<DayOfWeek> days,
                  int startHour,
                  int startMinute,
                  int endHour,
                  int endMinute)
Method Detail

valueOf

public static TimeWindow valueOf(String value)

getDaysOfWeek

public EnumSet<DayOfWeek> getDaysOfWeek()

getDuration

public long getDuration()

getEndHour

public int getEndHour()

getEndMinute

public int getEndMinute()

getNextPeriods

public Iterable<TimePeriod> getNextPeriods(int numPeriods)

getNextPeriods

public Iterable<TimePeriod> getNextPeriods(long startingTimestamp,
                                           int numPeriods)

getStartHour

public int getStartHour()

getStartMinute

public int getStartMinute()

isInWindow

public boolean isInWindow()

isInWindow

public boolean isInWindow(long atTimestamp)

iterator

public Iterator<TimePeriod> iterator()
Specified by:
iterator in interface Iterable<TimePeriod>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 enStratus Networks Inc. All Rights Reserved.