public final class DateRange extends Object implements Comparable<DateRange>
| Modifier and Type | Field and Description |
|---|---|
static DateRange |
EMPTY_RANGE |
| Constructor and Description |
|---|
DateRange(Date startDate,
Date endDate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Date date)
This method compares a target date with a date range.
|
int |
compareTo(DateRange o) |
boolean |
equals(Object o) |
Date |
getEnd()
Retrieve the date at the end of the range.
|
Date |
getStart()
Retrieve the date at the start of the range.
|
int |
hashCode() |
String |
toString() |
public static final DateRange EMPTY_RANGE
public Date getStart()
public Date getEnd()
public int compareTo(Date date)
date - target datepublic int compareTo(DateRange o)
compareTo in interface Comparable<DateRange>Copyright © 2013. All Rights Reserved.