public class SimpleScheduleResult extends java.lang.Object implements ScheduleResult, java.io.Serializable
ScheduleResult
END_OF_TIME, START_OF_TIME
Constructor and Description |
---|
SimpleScheduleResult(Interval interval) |
SimpleScheduleResult(Interval interval,
java.util.Date useNext) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Test if two intervals are equivalent.
|
java.util.Date |
getFromDate()
The date the interval is from which includes this date.
|
java.util.Date |
getToDate()
The date the interval is up to but excluding.
|
java.util.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.
|
java.lang.String |
toString() |
public SimpleScheduleResult(Interval interval)
public SimpleScheduleResult(Interval interval, java.util.Date useNext)
public java.util.Date getFromDate()
Interval
getFromDate
in interface Interval
public java.util.Date getToDate()
Interval
public java.util.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 int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
Intervals are equivalent if there start and end times are the same.
equals
in class java.lang.Object
other
- The interval to test against.public java.lang.String toString()
toString
in class java.lang.Object