m865.simulation
Class PressButtonEvent

java.lang.Object
  extended by m865.simulation.Event
      extended by m865.simulation.DepartmentStoreEvent
          extended by m865.simulation.PressButtonEvent
All Implemented Interfaces:
java.lang.Comparable, Prioritizeable

public class PressButtonEvent
extends DepartmentStoreEvent

Event related to ButtonSystem


Field Summary
 
Fields inherited from class m865.simulation.DepartmentStoreEvent
departmentStore
 
Fields inherited from class m865.simulation.Event
firingTime
 
Constructor Summary
PressButtonEvent(java.lang.Integer time, DepartmentStore store, Passenger p, int f)
          Constructor for objects of class PressButtonEvent
 
Method Summary
 void fire()
          Updates ButtonSystem.
 java.lang.String toString()
          Simple to string method to help with debugging.
 
Methods inherited from class m865.simulation.Event
adjustPriority, compareTo, getFiringTime, setFiringTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PressButtonEvent

public PressButtonEvent(java.lang.Integer time,
                        DepartmentStore store,
                        Passenger p,
                        int f)
Constructor for objects of class PressButtonEvent

Parameters:
f - Floor number (starts from 1)
Method Detail

fire

public void fire()
Updates ButtonSystem. Updates Passenger time record. Enters Passenger in appropriate queue. Schedules a BalkEvent.

Specified by:
fire in class Event

toString

public java.lang.String toString()
Simple to string method to help with debugging.

Overrides:
toString in class Event
Returns:
a string identifying this event.