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

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

public class RefuelAction
extends java.lang.Object
implements Action

Action which replenishes the fuel in the tanker.


Constructor Summary
RefuelAction()
           
 
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

RefuelAction

public RefuelAction()
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