Package org.geotools.util
Class DateRange
- All Implemented Interfaces:
Serializable
A range of dates.
- Since:
- 2.5
- Author:
- Martin Desruisseaux
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new date range for the given dates.Creates a new date range for the given dates.DateRange(MeasurementRange<?> range, Date origin) Creates a date range from the specified measurement range. -
Method Summary
Modifier and TypeMethodDescriptionReturns the end time.Returns the start time.Methods inherited from class Range
contains, contains, equals, getElementClass, hashCode, intersect, intersects, isEmpty, isMaxIncluded, isMinIncluded, subtract, toString, union
-
Constructor Details
-
DateRange
Creates a new date range for the given dates. Start time and end time are inclusive.- Parameters:
startTime- The start time (inclusive), ornullif none.endTime- The end time (inclusive), ornullif none.
-
DateRange
Creates a new date range for the given dates.- Parameters:
startTime- The start time, ornullif none.isMinIncluded-trueif the start time is inclusive.endTime- The end time, ornullif none.isMaxIncluded-trueif the end time is inclusive.
-
DateRange
Creates a date range from the specified measurement range. Units are converted as needed.- Parameters:
range- The range to convert.origin- The date to use as the origin.- Throws:
UnconvertibleException- if the given range doesn't have a unit compatible with milliseconds.
-
-
Method Details
-
getMinValue
Returns the start time.- Overrides:
getMinValuein classRange<Date>- Returns:
- The minimal value.
- See Also:
-
Range.getMinValue()
-
getMaxValue
Returns the end time.- Overrides:
getMaxValuein classRange<Date>- Returns:
- The maximal value.
- See Also:
-
Range.getMaxValue()
-