org.oddjob.schedules.schedules
Class LastSchedule

java.lang.Object
  extended by org.oddjob.schedules.AbstractSchedule
      extended by org.oddjob.schedules.schedules.LastSchedule
All Implemented Interfaces:
Serializable, RefineableSchedule, Schedule

public final class LastSchedule
extends AbstractSchedule
implements Serializable

Description

This schedule will return it's last due nested schedule within the given parent interval.

Example

Last Tuesday or Wednesday of the month, whichever is last.
<schedules:monthly fromDay="-6" toDay="0" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:last>
            <refinement>
                <schedules:list>
                    <schedules>
                        <schedules:weekly on="Tuesday"/>
                        <schedules:weekly on="Wednesday"/>
                    </schedules>
                </schedules:list>
            </refinement>
        </schedules:last>
    </refinement>
</schedules:monthly>
See Also:
Serialized Form
Author:
Rob Gordon

Constructor Summary
LastSchedule()
           
 
Method Summary
 ScheduleResult nextDue(ScheduleContext context)
          Calculate the next due interval within the given interval.
 String toString()
          Override toString.
 
Methods inherited from class org.oddjob.schedules.AbstractSchedule
getRefinement, setRefinement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LastSchedule

public LastSchedule()
Method Detail

nextDue

public ScheduleResult nextDue(ScheduleContext context)
Calculate the next due interval within the given interval.

Specified by:
nextDue in interface Schedule
Returns:
The next due interval for the schedule.

toString

public String toString()
Override toString.

Overrides:
toString in class Object