net.fortuna.ical4j.model
public class DateRange extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
INCLUSIVE_END
A flag indicating whether to include the end of the period in test functions.
|
static int |
INCLUSIVE_START
A flag indicating whether to include the start of the period in test functions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
adjacent(DateRange range)
Decides whether these periods are serial without a gap.
|
boolean |
after(DateRange range)
Decides whether this period starts after the given period ends.
|
boolean |
before(DateRange range)
Decides whether this period is completed before the given period starts.
|
boolean |
contains(DateRange range)
Decides whether the given period is completely contained within this one.
|
Date |
getRangeEnd() |
Date |
getRangeStart() |
boolean |
includes(Date date)
Determines if the specified date occurs within this period (inclusive of
period start and end).
|
boolean |
includes(Date date,
int inclusiveMask)
Decides whether a date falls within this period.
|
boolean |
intersects(DateRange range)
Decides whether this period intersects with another one.
|
public static final int INCLUSIVE_START
public static final int INCLUSIVE_END
public Date getRangeStart()
public Date getRangeEnd()
public final boolean includes(Date date)
date
- a date to test for inclusionpublic final boolean includes(Date date, int inclusiveMask)
date
- the date to be testedinclusiveMask
- specifies whether period start and end are included
in the calculationINCLUSIVE_START
,
INCLUSIVE_END
public final boolean before(DateRange range)
range
- a period that may or may not start after this period endspublic final boolean after(DateRange range)
range
- a period that may or may not end before this period startspublic final boolean intersects(DateRange range)
range
- a possible intersecting periodpublic final boolean adjacent(DateRange range)
range
- a period to test for adjacencypublic final boolean contains(DateRange range)
range
- the period that may be contained by this oneCopyright © 2004-2013 Micronode. All Rights Reserved.