|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A DateInterval describes some duration of time. The start and end dates of the date interval may be defined or undefined, or inclusive or exclusive. An undefined start or end date describes the interval as being unbounded towards negative or positive eternity. If the intervals start or end dates are described as inclusive, then that date is considered to be included within the duration, rather than simply marking its boundary. By default, a DateInterval's start and end dates are inclusive. A DateInterval must not represent a bounded span of days larger then ~5.8 million years.
| Field Summary | |
static int |
INFINITY
|
| Method Summary | |
boolean |
contains(com.ds.fw.types.data.FwDateIF d)
Determine if the date is contained in this interval. |
boolean |
contains(com.ds.fw.types.data.FwDateIntervalIF di)
Same as containsInterval(di). |
boolean |
contains(com.ds.fw.types.data.FwTimestampIF ts)
Determine if the timestamp is contained in this interval. |
boolean |
containsInterval(com.ds.fw.types.data.FwDateIntervalIF di)
Determine if the date interval parameter is wholly contained within this date interval. |
boolean |
containsToday()
Determine if today is contained in this interval. |
java.util.Enumeration |
elements()
Return an Enumeration iterating over the days contained in this DateInterval. |
boolean |
endsAfter(com.ds.fw.types.data.FwDateIF d)
Determine if this date interval ends after some date. |
boolean |
endsBefore(com.ds.fw.types.data.FwDateIF d)
Detemine if this date interval ends before some date. |
boolean |
endsOn(com.ds.fw.types.data.FwDateIF d)
Determine if an input date is the last day contained within this DateInterval. |
boolean |
endsOnOrAfter(com.ds.fw.types.data.FwDateIF d)
Determine if this interval ends on or after a date. |
com.ds.fw.types.data.FwDateIntervalIF |
getDateIntervalCopy()
Get and independent copy of this date interval. |
com.ds.fw.types.data.FwDateIF |
getEndDate()
Return the end date. |
com.ds.fw.types.data.FwDateIF |
getFirstDate()
Return the first date contained within this interval. |
com.ds.fw.types.data.FwDateIntervalIF |
getIntersection(com.ds.fw.types.data.FwDateIntervalIF di)
Get the date interval the represents the intersection of this date interval with another interval. |
com.ds.fw.types.data.FwDateIF |
getLastDate()
Return the last date contained within this interval. |
int |
getNumberOfDays()
Return the number of days that are contained inside of this DateInterval. |
com.ds.fw.types.data.FwDateIF |
getStartDate()
Return the start date. |
com.ds.fw.types.data.FwDateIntervalIF |
getUnion(com.ds.fw.types.data.FwDateIntervalIF di)
Merge my interval with di and return the result. |
boolean |
hasBoundedEnd()
Determine if the end date is bounded (!null). |
boolean |
hasBoundedStart()
Determine if the startDate is bounded (!null). |
boolean |
hasUnboundedEnd()
Determine if the end date is unbounded (null). |
boolean |
hasUnboundedStart()
Determine if the startDate is unbounded (null). |
boolean |
intersects(com.ds.fw.types.data.FwDateIntervalIF di)
Same as intersectsInterval(di); |
boolean |
intersectsInterval(com.ds.fw.types.data.FwDateIntervalIF di)
Determine if this date interval overlaps another date interval. |
boolean |
isAdjacentAfter(com.ds.fw.types.data.FwDateIntervalIF di)
Determine if my firstDate is the day after the parameter's lastDate. |
boolean |
isAdjacentBefore(com.ds.fw.types.data.FwDateIntervalIF di)
Determine if my lastDate is the day before the parameter's firstDate. |
boolean |
isAdjacentTo(com.ds.fw.types.data.FwDateIntervalIF di)
Determine if this interval is adjacent before or adjacent after another interval. |
boolean |
isBounded()
Determine if both the start and end dates are bounded. |
boolean |
isEndDateInclusive()
Return a boolean describing whether or not the end date is considered to be contained within the DateInterval. |
boolean |
isInfinity()
same as isUnbounded(). |
boolean |
isStartDateInclusive()
Return a boolean describing whether or not the start date is considered to be contained within the DateInterval. |
boolean |
isUnbounded()
Determine if both the start and end dates are unbounded. |
boolean |
isValid()
Determine if the first date is less than or equal to the end date. |
java.util.Iterator |
iterator()
Same as elements but return an iterator. |
void |
makeEndDateExclusive()
Make the end date be exclusive. |
void |
makeEndDateInclusive()
Make the end date be inclusive. |
void |
makeStartDateExclusive()
Make the start date be exclusive. |
void |
makeStartDateInclusive()
Make the start date be inclusive. |
boolean |
merge(com.ds.fw.types.data.FwDateIntervalIF di)
Merge my interval with di. |
boolean |
mergeAdjacent(com.ds.fw.types.data.FwDateIntervalIF di)
Merge my interval with di. |
void |
setEndDate(com.ds.fw.types.data.FwDateIF d)
Set the end date. |
void |
setStartDate(com.ds.fw.types.data.FwDateIF d)
Set the start date. |
int |
size()
Same as getNumberOfDays() |
boolean |
startsAfter(com.ds.fw.types.data.FwDateIF d)
Detemine if this date interval starts after some date. |
boolean |
startsBefore(com.ds.fw.types.data.FwDateIF d)
Determine if this date interval starts before some date. |
boolean |
startsLaterThan(com.ds.fw.types.data.FwDateIntervalIF di)
Return whether this date interval starts later than the indicated date interval. |
boolean |
startsOn(com.ds.fw.types.data.FwDateIF d)
Return a boolean describing whether or not an input date is the first day contained within this DateInterval. |
boolean |
startsOnOrBefore(com.ds.fw.types.data.FwDateIF d)
Determine if this interval starts on or before a date. |
| Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString, toStringValue |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Field Detail |
public static final int INFINITY
| Method Detail |
public com.ds.fw.types.data.FwDateIF getStartDate()
public void setStartDate(com.ds.fw.types.data.FwDateIF d)
public com.ds.fw.types.data.FwDateIF getEndDate()
public void setEndDate(com.ds.fw.types.data.FwDateIF d)
public java.util.Enumeration elements()
FwDateIntervalEnumerationIFpublic java.util.Iterator iterator()
public int getNumberOfDays()
public int size()
public com.ds.fw.types.data.FwDateIF getFirstDate()
public com.ds.fw.types.data.FwDateIF getLastDate()
public boolean isValid()
public boolean contains(com.ds.fw.types.data.FwDateIF d)
public boolean contains(com.ds.fw.types.data.FwTimestampIF ts)
public boolean containsToday()
public boolean containsInterval(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean contains(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean intersectsInterval(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean intersects(com.ds.fw.types.data.FwDateIntervalIF di)
public com.ds.fw.types.data.FwDateIntervalIF getIntersection(com.ds.fw.types.data.FwDateIntervalIF di)
public com.ds.fw.types.data.FwDateIntervalIF getUnion(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean merge(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean mergeAdjacent(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean startsOn(com.ds.fw.types.data.FwDateIF d)
public boolean startsBefore(com.ds.fw.types.data.FwDateIF d)
public boolean startsAfter(com.ds.fw.types.data.FwDateIF d)
public boolean endsOn(com.ds.fw.types.data.FwDateIF d)
public boolean endsBefore(com.ds.fw.types.data.FwDateIF d)
public boolean endsAfter(com.ds.fw.types.data.FwDateIF d)
public boolean startsOnOrBefore(com.ds.fw.types.data.FwDateIF d)
startsOn(),
startsBefore()public boolean endsOnOrAfter(com.ds.fw.types.data.FwDateIF d)
endsOn(),
endsAfter()public boolean hasBoundedStart()
public boolean hasUnboundedStart()
public boolean hasBoundedEnd()
public boolean hasUnboundedEnd()
public boolean isBounded()
public boolean isUnbounded()
public boolean isInfinity()
public boolean isStartDateInclusive()
public boolean isEndDateInclusive()
public boolean startsLaterThan(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean isAdjacentTo(com.ds.fw.types.data.FwDateIntervalIF di)
isAdjacentAfter(),
isAdjacentBefore()public boolean isAdjacentAfter(com.ds.fw.types.data.FwDateIntervalIF di)
public boolean isAdjacentBefore(com.ds.fw.types.data.FwDateIntervalIF di)
public void makeStartDateInclusive()
public void makeStartDateExclusive()
public void makeEndDateInclusive()
public void makeEndDateExclusive()
public com.ds.fw.types.data.FwDateIntervalIF getDateIntervalCopy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||