Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.treesched.schedules
Class IntervalSchedule

    java.lang.Object
      org.treesched.AbstractSchedule
          org.treesched.RegularSchedule
              org.treesched.schedules.IntervalSchedule

All Implemented Interfaces:
  RefineableSchedule, Schedule, java.io.Serializable

public final class IntervalSchedule
extends RegularSchedule
implements java.io.Serializable

This schedule returns an interval from the given time to the interval time later. Commonly used within a time schedule.

Typical configuration is: ``

     <interval interval="00:20"/>>

Author:
  Rob Gordon
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `DEFAULT_DATE_FORMAT`

Constructor Summary
`IntervalSchedule()` Constructor.

Method Summary
`java.lang.String` | `getFormat()` Get the date format used for translating string attributes.
`java.util.Date` | `next(java.util.Date from)` Given a date, return the date which is interval of this RegularScheudle later.
`void` | `setFormat(java.lang.String dateFormat)` Set the date format to use for translating string attributes.
`void` | `setInterval(java.lang.String interval)` Set the interval.

Methods inherited from class org.treesched.RegularSchedule
`nextDue, toString`

Methods inherited from class org.treesched.AbstractSchedule
`addChildSchedule, getChildSchedule, getLimits, reset, setChildSchedule, setLimits`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_DATE_FORMAT

    public static final java.lang.String DEFAULT_DATE_FORMAT

See Also:
  Constant Field Values

Constructor Detail

### IntervalSchedule

    public IntervalSchedule()

  Constructor.

Method Detail

### setFormat

    public void setFormat(java.lang.String dateFormat)

  Set the date format to use for translating string attributes.

  Parameters:
    `dateFormat` - The date format.

### getFormat

    public java.lang.String getFormat()

  Get the date format used for translating string attributes.

  Returns:
    The date format being used.

### setInterval

    public void setInterval(java.lang.String interval)
                     throws java.text.ParseException

  Set the interval.

  Parameters:
    `interval` - The interval.
  Throws:
    `java.text.ParseException` - If the interval is not a valid date.

### next

    public java.util.Date next(java.util.Date from)

  Description copied from class: `RegularSchedule`
  Given a date, return the date which is interval of this RegularScheudle later.

  Specified by:
    `next` in class `RegularSchedule`
  Parameters:
    `from` - The date from which this schedule runs.
  Returns:
    The interval later.

Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD