Package net.fortuna.ical4j.model
Class DateRange
java.lang.Object
net.fortuna.ical4j.model.DateRange
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Period
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA flag indicating whether to include the end of the period in test functions.static final intA flag indicating whether to include the start of the period in test functions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanDecides whether these periods are serial without a gap.final booleanDecides whether this period starts after the given period ends.final booleanDecides whether this period is completed before the given period starts.final booleanDecides whether the given period is completely contained within this one.booleaninthashCode()final booleanDetermines if the specified date occurs within this period (inclusive of period start and end).final booleanDecides whether a date falls within this period.final booleanintersects(DateRange range) Decides whether this period intersects with another one.
-
Field Details
-
INCLUSIVE_START
public static final int INCLUSIVE_STARTA flag indicating whether to include the start of the period in test functions.- See Also:
-
INCLUSIVE_END
public static final int INCLUSIVE_ENDA flag indicating whether to include the end of the period in test functions.- See Also:
-
-
Constructor Details
-
DateRange
- Parameters:
start- the start of the rangeend- the end of the range
-
-
Method Details
-
getRangeStart
- Returns:
- the rangeStart
-
getRangeEnd
- Returns:
- the rangeEnd
-
includes
Determines if the specified date occurs within this period (inclusive of period start and end).- Parameters:
date- a date to test for inclusion- Returns:
- true if the specified date occurs within the current period
-
includes
Decides whether a date falls within this period.- Parameters:
date- the date to be testedinclusiveMask- specifies whether period start and end are included in the calculation- Returns:
- true if the date is in the period, false otherwise
- See Also:
-
before
Decides whether this period is completed before the given period starts.- Parameters:
range- a period that may or may not start after this period ends- Returns:
- true if the specified period starts after this periods ends, otherwise false
-
after
Decides whether this period starts after the given period ends.- Parameters:
range- a period that may or may not end before this period starts- Returns:
- true if the specified period end before this periods starts, otherwise false
-
intersects
Decides whether this period intersects with another one.- Parameters:
range- a possible intersecting period- Returns:
- true if the specified period intersects this one, false otherwise.
-
adjacent
Decides whether these periods are serial without a gap.- Parameters:
range- a period to test for adjacency- Returns:
- true if one period immediately follows the other, false otherwise
-
contains
Decides whether the given period is completely contained within this one.- Parameters:
range- the period that may be contained by this one- Returns:
- true if this period covers all the dates of the specified period, otherwise false
-
equals
-
hashCode
public int hashCode()
-