org.haphazard.system.action
Class Action

java.lang.Object
  extended byorg.haphazard.XML.MessageHandler
      extended byorg.haphazard.system.action.Action
Direct Known Subclasses:
CharacterAction

public class Action
extends MessageHandler

General class for handling an action in the world


Field Summary
protected  java.util.Observer mController
           
protected  long mExecutionTime
           
protected  long mTimeStarted
           
 
Fields inherited from class org.haphazard.XML.MessageHandler
mMessageBuffer
 
Constructor Summary
Action()
          Creates a new instance of Action
 
Method Summary
 boolean equals(java.lang.Object object)
          Tests if this action equals another action
 boolean perform()
          Performs the action
 void start(long time)
          Starts the action
 
Methods inherited from class org.haphazard.XML.MessageHandler
addMessage, getNextMessage, hasMessage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mController

protected java.util.Observer mController

mTimeStarted

protected long mTimeStarted

mExecutionTime

protected long mExecutionTime
Constructor Detail

Action

public Action()
Creates a new instance of Action

Method Detail

start

public void start(long time)
Starts the action

Parameters:
time - The time the action is considered to be started

perform

public boolean perform()
Performs the action

Returns:
true if terminated for whatever reason

equals

public boolean equals(java.lang.Object object)
Tests if this action equals another action

Parameters:
object - The object to test against