|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfc.util.Range
fc.util.DateRange
public class DateRange
A range of dates.
Constructor Summary | |
---|---|
DateRange(java.util.Date start,
java.util.Date end)
Constructs a date range between the specified start and end dates (both inclusive). |
Method Summary | |
---|---|
java.util.Date |
getEnd()
Get the end date for this range |
java.util.Date |
getStart()
Get the start date for this range |
boolean |
inRange(java.util.Date d)
|
static void |
main(java.lang.String[] args)
|
boolean |
overlaps(DateRange dr)
|
void |
setEnd(java.util.Date d)
Sets the end date for this range |
void |
setStart(java.util.Date d)
Set the start date for this range |
java.lang.String |
toString()
Output a string representation of the date range |
Methods inherited from class fc.util.Range |
---|
isNegated, setNegated |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DateRange(java.util.Date start, java.util.Date end)
java.lang.IllegalArgumentException
- if the end date is lesser (via an compareTo
comparison) than the start date (equal to the start date
is ok)Method Detail |
---|
public java.util.Date getStart()
public java.util.Date getEnd()
public boolean inRange(java.util.Date d)
java.lang.IllegalArgumentException
- if the specified date was nullpublic boolean overlaps(DateRange dr)
java.lang.IllegalArgumentException
- if the specified date was nullpublic void setStart(java.util.Date d)
java.lang.NullPointerException
- if the specified date was null
java.lang.IllegalArgumentException
- if the specified date is greater (via an compareTo
comparison) than the currently set end date (equal to the
end date is ok)public void setEnd(java.util.Date d)
d
- the end date
java.lang.NullPointerException
- if the specified date was null
java.lang.IllegalArgumentException
- if the specified end date is lesser (via an compareTo
comparison) than the currently set start date (equal to
the start date is ok)public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |