Class ArrivalEvent

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

public class ArrivalEvent
extends Event

A class used to represent an arrival event in the lunch-seating simulation. An arrival event is used to indicate that a new Party has arrived to be seated for lunch. The time the ArrivalEvent occurs will be stored in a Clock.

See Also:
Event, Party, Clock

Fields inherited from class Event
party
 
Constructor Summary
ArrivalEvent(Party party)
          Creates a new ArrivalEvent.
 
Method Summary
 Party getParty()
          Returns the party waiting to be seated.
 boolean isArrival()
          Indicates that this is an arrival event
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

ArrivalEvent

public ArrivalEvent(Party party)
Creates a new ArrivalEvent.
Parameters:
party - the party which is arriving to be seated in the simulation
Method Detail

getParty

public Party getParty()
Returns the party waiting to be seated.

isArrival

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