Package jmri.jmrit.timetable
Class Schedule
java.lang.Object
jmri.jmrit.timetable.Schedule
Define the content of a Schedule record.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCopy(int layoutId) Make a copy of the schedule.intintintintvoidsetDuration(int newDuration) Set the duration, 1 - 24 hours.voidsetEffDate(String newDate) voidsetScheduleName(String newName) voidsetStartHour(int newStartHour) Set the start hour, 0 - 23.toString()
-
Field Details
-
_dm
-
-
Constructor Details
-
Schedule
Create a new schedule with default values.- Parameters:
layoutId- The parent layout id.- Throws:
IllegalArgumentException- SCHEDULE_ADD_FAIL
-
Schedule
-
-
Method Details
-
getCopy
Make a copy of the schedule.- Parameters:
layoutId- The new layoutId, if zero use the current layout id.- Returns:
- a new schedule instance.
-
getScheduleId
-
getLayoutId
-
getScheduleName
-
setScheduleName
-
getEffDate
-
setEffDate
-
getStartHour
-
setStartHour
Set the start hour, 0 - 23.- Parameters:
newStartHour- The start hour in the range of 0 to 23.- Throws:
IllegalArgumentException- (START_HOUR_RANGE).
-
getDuration
-
setDuration
Set the duration, 1 - 24 hours.- Parameters:
newDuration- The duration in the range of 1 to 24.- Throws:
IllegalArgumentException- (DURATION_RANGE).
-
toString
-