| Constructor and Description |
|---|
EventSchedule(String timeUnit,
float startTime,
float endTime)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(Event event)
Add an event to the schedule
|
float |
getEndTime()
Return the end time of the event schedule
|
Event |
getEvent(int i)
Return the i-th event of the schedule
|
float |
getStartTime()
Return the start time of the event schedule
|
String |
getTimeUnit()
Return the unit of time
|
Iterator<Event> |
iterator()
Returns an iterator over the events of the schedule.
|
void |
removeEvent(Event event)
Remove an event from the schedule
|
void |
removeEvent(int i)
Add an event to the schedule
|
void |
setEndTime(long endTime)
Set the end time of the event schedule
|
void |
setStartTime(long startTime)
Set the start time of the event schedule
|
void |
setTimeUnit(String timeUnit)
Set the unit of time
|
int |
size()
Return the number of events in the schedule
|
public EventSchedule(String timeUnit, float startTime, float endTime)
timeUnit - The unit of time of the eventstartTime - The start time of the scheduleendTime - The end time of the schedulepublic String getTimeUnit()
public void setTimeUnit(String timeUnit)
timeUnit - the unit of timepublic float getStartTime()
public void setStartTime(long startTime)
startTime - the start timepublic float getEndTime()
public void setEndTime(long endTime)
endTime - the endTime to setpublic void addEvent(Event event)
event - The Event object to add to the schedulepublic void removeEvent(int i)
i - The index of the Event object to removepublic void removeEvent(Event event)
event - The Event object to removepublic Event getEvent(int i)
i - the index of the Event objectipublic int size()