uk.ac.nott.cs.g54dia.library
Class LoadWaterAction

java.lang.Object
  extended by uk.ac.nott.cs.g54dia.library.LoadWaterAction
All Implemented Interfaces:
Action

public class LoadWaterAction
extends java.lang.Object
implements Action

Action which loads water into the tanker.


Constructor Summary
LoadWaterAction()
           
 
Method Summary
 void execute(Environment env, Tanker tank)
          Execute the action for this Tanker in this Environment.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoadWaterAction

public LoadWaterAction()
Method Detail

execute

public void execute(Environment env,
                    Tanker tank)
             throws ActionFailedException
Description copied from interface: Action
Execute the action for this Tanker in this Environment.

Specified by:
execute in interface Action
Parameters:
env - The Environment that the Tanker inhabits.
tank - The Tanker trying to perform this action.
Throws:
ActionFailedException - The action couldn't be performed.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object