com.std.util.range
Class WeekRange

java.lang.Object
extended by com.std.util.range.DateRange extended by com.std.util.range.WeekRange
All Implemented Interfaces:
java.io.Serializable

public class WeekRange
extends DateRange

represents a full week as a range of dates the start date will always be at midnight on the Sunday at the beginning of the week, and the end date is exactly 7 days later.

Author:
xxx
See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
WeekRange()
          creates a WeekRange representing this week
WeekRange(java.util.Date date)
          creates a WeekRange representing the week of the given date
 
Method Summary
 java.util.List<DayRange> getDays()
           
 WeekRange nextWeek()
           
 WeekRange previousWeek()
           
 
Methods inherited from class com.std.util.range.DateRange
equals, getDurationInDays, getDurationInMS, getEndDate, getStartDate, hashCode, setEndDate, setStartDate, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

WeekRange

public WeekRange()
creates a WeekRange representing this week


WeekRange

public WeekRange(java.util.Date date)
creates a WeekRange representing the week of the given date

Parameters:
date - a date in the week to represent
Method Detail

getDays

public java.util.List<DayRange> getDays()
Returns:
a list of the 7-days representing this week

nextWeek

public WeekRange nextWeek()
Returns:
the next sequential week

previousWeek

public WeekRange previousWeek()
Returns:
the previous sequential week