Class DepartureEvent

java.lang.Object
  |
  +--Event
        |
        +--DepartureEvent

public class DepartureEvent
extends Event

A class used to represent a departure event in the lunch-seating simulation. A departure event is used to indicate that a Party has finished eating and is ready to depart. The time the DepartureEvent occurs will be stored in a Clock

See Also:
Event, Party, Clock

Field Summary
private  int tableSize
          The size of table the party was eating at
 
Fields inherited from class Event
party
 
Constructor Summary
DepartureEvent(Party party, int size)
          Creates a new DepartureEvent.
 
Method Summary
 Party getParty()
          Returns the party which is departing
 int getTable()
          Returns the size of table the party was seated at
 boolean isArrival()
          Indicates that this is not an arrival event
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

tableSize

private int tableSize
The size of table the party was eating at
Constructor Detail

DepartureEvent

public DepartureEvent(Party party,
                      int size)
Creates a new DepartureEvent.
Parameters:
party - the party which is arriving to be seated in the simulation
size - the size of table the party is seated at (<= MAX_PARTY_SIZE)
See Also:
Simulation
Method Detail

getParty

public Party getParty()
Returns the party which is departing

getTable

public int getTable()
Returns the size of table the party was seated at

isArrival

public boolean isArrival()
Indicates that this is not an arrival event
Returns:
false
Overrides:
isArrival in class Event