|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.Schedule dk.netarkivet.harvester.datamodel.RepeatingSchedule
public class RepeatingSchedule
This class implements a schedule that should run a certain number of times.
Field Summary |
---|
Fields inherited from class dk.netarkivet.harvester.datamodel.Schedule |
---|
comments, edition, frequency, name, startDate |
Constructor Summary | |
---|---|
RepeatingSchedule(java.util.Date startDate,
int repeats,
Frequency frequency,
java.lang.String name,
java.lang.String comments)
Create a new RepeatingSchedule that runs a given number of times. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Autogenerated equals. |
java.util.Date |
getNextEvent(java.util.Date lastEvent,
int numPreviousEvents)
Return the date at which the next event will happen. |
int |
getRepeats()
Return how many times this schedule should be triggered. |
int |
hashCode()
Autogenerated hashcode method. |
java.lang.String |
toString()
Human readable represenation of this object. |
Methods inherited from class dk.netarkivet.harvester.datamodel.Schedule |
---|
getComments, getEdition, getFirstEvent, getFrequency, getID, getInstance, getInstance, getName, getStartDate, hasID, setComments, setEdition, setID |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RepeatingSchedule(java.util.Date startDate, int repeats, Frequency frequency, java.lang.String name, java.lang.String comments)
startDate
- The time at which the schedule starts running. This
is not necessarily the time of the first event, but no events will
happen before this. May be null, meaning start any time.repeats
- how many events should happen totally.frequency
- How frequently the event should happen.name
- The unique name of the schedule.comments
- Comments entered by the user
ArgumentNotValid
- if frequency, name or comments is null, or name
is "" or repeats is 0 or negativeMethod Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class Schedule
o
- The object to compare with
public int hashCode()
hashCode
in class Schedule
public java.util.Date getNextEvent(java.util.Date lastEvent, int numPreviousEvents)
getNextEvent
in class Schedule
lastEvent
- The time at which the previous event happened.numPreviousEvents
- How many events have previously happened.
ArgumentNotValid
- if numPreviousEvents is negativepublic int getRepeats()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |