Package ucar.nc2.calendar
Class CalendarDateRange
- java.lang.Object
-
- ucar.nc2.calendar.CalendarDateRange
-
@Immutable public class CalendarDateRange extends Object
A range of CalendarDates: the half open interval [start, end)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CalendarDateRange
extend(CalendarDateRange other)
Extend the range by another range.long
getDurationInSecs()
The duration of the range in seconds.CalendarDate
getEnd()
Ending date.CalendarDate
getStart()
Starting date.int
hashCode()
boolean
includes(CalendarDate cd)
Does the range include this date?CalendarDateRange
intersect(CalendarDateRange clip)
Create a new CalendarDateRange as the intersection of this and the given other range.boolean
intersects(CalendarDateRange other)
Does the range intersect another range?static CalendarDateRange
of(Date start, Date end)
static CalendarDateRange
of(CalendarDate start, long durationInSecs)
static CalendarDateRange
of(CalendarDate start, CalendarDate end)
String
toString()
-
-
-
Method Detail
-
of
public static CalendarDateRange of(CalendarDate start, CalendarDate end)
-
of
public static CalendarDateRange of(Date start, Date end)
-
of
public static CalendarDateRange of(CalendarDate start, long durationInSecs)
-
getStart
public CalendarDate getStart()
Starting date.
-
getEnd
public CalendarDate getEnd()
Ending date.
-
getDurationInSecs
public long getDurationInSecs()
The duration of the range in seconds.
-
extend
public CalendarDateRange extend(CalendarDateRange other)
Extend the range by another range.
-
includes
public boolean includes(CalendarDate cd)
Does the range include this date?
-
intersect
public CalendarDateRange intersect(CalendarDateRange clip)
Create a new CalendarDateRange as the intersection of this and the given other range.
-
intersects
public boolean intersects(CalendarDateRange other)
Does the range intersect another range?
-
-