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

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

public class DeliverWaterAction
extends java.lang.Object
implements Action

Action which delivers water from the tanker to a station.


Field Summary
(package private)  Task task
           
 
Constructor Summary
DeliverWaterAction(Task t)
           
 
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
 

Field Detail

task

Task task
Constructor Detail

DeliverWaterAction

public DeliverWaterAction(Task t)
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