|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.schedules.IntervalTo
public class IntervalTo
An Interval that extends to, but does not include the to date.
Field Summary |
---|
Fields inherited from interface org.oddjob.schedules.Interval |
---|
END_OF_TIME, START_OF_TIME |
Constructor Summary | |
---|---|
IntervalTo(Date on)
Create a point interval. |
|
IntervalTo(Date from,
Date upTo)
Create an interval up to the to Date. |
|
IntervalTo(Interval interval)
Create an copy of the given Interval. |
Method Summary | |
---|---|
boolean |
equals(Object other)
Test if two intervals are equivalent. |
protected Date |
getEndDate()
Get the to date of the interval. |
Date |
getFromDate()
Get the from date of the interval. |
Date |
getToDate()
Get the upTo date which is a millisecond after the inclusive to date. |
Date |
getUseNext()
For recurring schedules this property provide the date that should be used for the next call to Schedule.nextDue(ScheduleContext) by using
the ScheduleContext.move(Date) method. |
int |
hashCode()
Crude implementation of hashCode, so intervals could be stored in HashSets. |
boolean |
isBefore(org.oddjob.schedules.IntervalBase other)
Test if this interval is before the other interval. |
boolean |
isPast(org.oddjob.schedules.IntervalBase other)
Test if this interval is past the other interval. |
boolean |
isPoint()
Is this interval really a point in time, not an interval. |
Interval |
limit(Interval limit)
Provide an interval which is the result of this Limit being limited by the given interval. |
String |
toString()
Return a string representation of this interval. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.oddjob.schedules.Interval |
---|
getFromDate |
Constructor Detail |
---|
public IntervalTo(Date on)
on
- public IntervalTo(Date from, Date upTo)
from
- upTo
- public IntervalTo(Interval interval)
interval
- Method Detail |
---|
public Date getToDate()
getToDate
in interface Interval
public Interval limit(Interval limit)
Results are determined as follows.
other
- The other interval. may be null.
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
Intervals are equivalent if there start and end times are the same.
equals
in class Object
other
- The interval to test against.
public String toString()
public Date getUseNext()
ScheduleResult
Schedule.nextDue(ScheduleContext)
by using
the ScheduleContext.move(Date)
method. For most schedules this
date will be identical to the Interval.getToDate()
but for some
schedules such AfterSchedule
this will not be the case.
getUseNext
in interface ScheduleResult
public Date getFromDate()
protected Date getEndDate()
public boolean isBefore(org.oddjob.schedules.IntervalBase other)
This happens when this from time is less than other from time.
this: ---- or ---- other: ---- ----
other
-
public boolean isPast(org.oddjob.schedules.IntervalBase other)
This happens when the this from time is greater than the other ones to time.
this: ---- other: ----
public boolean isPoint()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |