Class DateRange
java.lang.Object
fc.util.Range
fc.util.DateRange
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Range
isNegated, setNegated
-
Constructor Details
-
DateRange
Constructs a date range between the specified start and end dates (both inclusive).- Throws:
IllegalArgumentException- if the end date is lesser (via an compareTo comparison) than the start date (equal to the start date is ok)
-
-
Method Details
-
getStart
-
getEnd
-
inRange
- Returns:
- true if the passed in date is inside this range. Note, the entire date (including the milliseconds/seconds portion) is considered by this function.
- Throws:
IllegalArgumentException- if the specified date was null
-
overlaps
- Returns:
- true if any part of the passed in date range overlaps this range. Note, the entire date (including the milliseconds/seconds portion) is considered by this function.
- Throws:
IllegalArgumentException- if the specified date was null
-
setStart
Set the start date for this range- Throws:
NullPointerException- if the specified date was nullIllegalArgumentException- if the specified date is greater (via an compareTo comparison) than the currently set end date (equal to the end date is ok)
-
setEnd
Sets the end date for this range- Parameters:
d- the end date- Throws:
NullPointerException- if the specified date was nullIllegalArgumentException- if the specified end date is lesser (via an compareTo comparison) than the currently set start date (equal to the start date is ok)
-
toString
-
main
-