public class DateRange extends Object
Constructor and Description |
---|
DateRange(long start,
long end)
Creates a new range of consecutive dates.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getEnd()
Returns the end date for this date range.
|
long |
getStart()
Returns the start date for this date range.
|
int |
hashCode() |
void |
setEnd(long end)
Sets a new end date for the date range.
|
void |
setStart(long start)
Sets a new start date for the date range.
|
public DateRange(long start, long end)
start
- start dateend
- end dateIllegalArgumentException
- If the start date is after the end datepublic long getStart()
public void setStart(long start)
start
- the new start date for the date rangeIllegalArgumentException
- If the start date is after the end datepublic long getEnd()
public void setEnd(long end)
end
- the new end date for the date rangeIllegalArgumentException
- If the end date is before the start date