|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractEvent
public abstract class AbstractEvent
Abstract class for simulation events.
COMP 2100
Project 3
October 2014
Field Summary |
---|
Fields inherited from interface Event |
---|
ARRIVAL_PRIORITY, DEPARTURE_PRIORITY, SIMULATIONEND_PRIORITY, SIMULATIONREPORT_PRIORITY |
Constructor Summary | |
---|---|
protected |
AbstractEvent(int time,
int priority)
Constructor, only accessible to subclasses. |
Method Summary | |
---|---|
int |
compareTo(Event e)
Compares this event to the given event. |
int |
getPriority()
Retrieves the event's priority. |
int |
getTime()
Retrieves the event's scheduled time. |
protected void |
setPriority(int priority)
Sets the event's priority. |
protected void |
setTime(int time)
Set the event's scheduled time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Event |
---|
process |
Constructor Detail |
---|
protected AbstractEvent(int time, int priority)
time
- The event's scheduled time.priority
- The event's priority.Method Detail |
---|
public int getTime()
getTime
in interface Event
public int getPriority()
getPriority
in interface Event
protected void setTime(int time)
time
- The event's scheduled time.protected void setPriority(int priority)
priority
- The event's priority.public int compareTo(Event e)
compareTo
in interface java.lang.Comparable<Event>
e
- The event this one is compared to
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |