net.kolls.railworld.play.script
Class TalCondition

java.lang.Object
  extended by net.kolls.railworld.play.script.TalCondition

public class TalCondition
extends java.lang.Object

A train-action-listener condition includes a train action listener, a train, and an event name. The listener is notified when the given event occurs for the given train. The train may be null which means the listener will be notified for the given event for any train.

Author:
Steve Kollmansberger

Field Summary
 java.lang.String event
          Event name to watch for.
 Train t
          Train to watch for, or null for any train.
 TrainActionListener tal
          Listener to notify
 
Constructor Summary
TalCondition(TrainActionListener tal, Train t, java.lang.String event)
          Create a condition
 
Method Summary
 boolean equals(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tal

public TrainActionListener tal
Listener to notify


t

public Train t
Train to watch for, or null for any train.


event

public java.lang.String event
Event name to watch for. The event names are given in TrainActionListener.trainAction(Train, String).

Constructor Detail

TalCondition

public TalCondition(TrainActionListener tal,
                    Train t,
                    java.lang.String event)
Create a condition

Parameters:
tal - See tal
t - See t
event - See event
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object