org.starhope.appius.user.events
Class Action

java.lang.Object
  extended by org.starhope.appius.user.events.Action

public class Action
extends Object

An action (event) that has happened in the game (or the system) and can be accepted by various event handlers. In most systems, these would be called an Event, except that the existing terminology conflicts.

Author:
brpocock@star-hope.org

Field Summary
private  String indirectObject
          WRITEME: Document this brpocock@star-hope.org
private  AbstractUser object
          WRITEME: Document this brpocock@star-hope.org
private  AbstractUser subject
          WRITEME: Document this brpocock@star-hope.org
private  Object[] trailer
          WRITEME: Document this brpocock@star-hope.org
private  String verb
          WRITEME: Document this brpocock@star-hope.org
private  Room where
          WRITEME: Document this brpocock@star-hope.org
 
Constructor Summary
Action(AbstractUser someSubject, String someVerb, AbstractUser someObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(AbstractUser someSubject, String someVerb, AbstractUser someObject, String someIndirectObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(AbstractUser someSubject, String someVerb, Object... optionalTrailer)
          Create a new Action with only a subject, verb, and optional trailer records
Action(AbstractUser someSubject, String someVerb, String someIndirectObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(Room somewhere, AbstractUser someSubject, String someVerb, AbstractUser someObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(Room somewhere, AbstractUser someSubject, String someVerb, AbstractUser someObject, String someIndirectObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(Room newWhere, AbstractUser newSubject, String newVerb, Object... newTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(Room somewhere, AbstractUser someSubject, String someVerb, String someIndirectObject, Object... optionalTrailer)
          WRITEME: Document this constructor brpocock@star-hope.org
Action(String justAVerb)
          an Action with just a bare verb
Action(String v, String dative)
          WRITEME: Document this constructor brpocock@star-hope.org
 
Method Summary
 String getIndirectObject()
           
 AbstractUser getObject()
           
 AbstractUser getSubject()
           
 Object[] getTrailer()
           
 Object getTrailer(int n)
          Get an item from the trailer, if it exists, or a “null” if not.
 String getTrailerString(int n)
          Get a string from the trailer, if it exists, or a zero-length string, if not.
 String getVerb()
           
 Room getWhere()
           
 void log()
          WRITEME: Document this method brpocock@star-hope.org
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indirectObject

private final String indirectObject
WRITEME: Document this brpocock@star-hope.org


object

private final AbstractUser object
WRITEME: Document this brpocock@star-hope.org


subject

private final AbstractUser subject
WRITEME: Document this brpocock@star-hope.org


trailer

private final Object[] trailer
WRITEME: Document this brpocock@star-hope.org


verb

private final String verb
WRITEME: Document this brpocock@star-hope.org


where

private final Room where
WRITEME: Document this brpocock@star-hope.org

Constructor Detail

Action

public Action(AbstractUser someSubject,
              String someVerb,
              AbstractUser someObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
someSubject - WRITEME
someVerb - WRITEME
someObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(AbstractUser someSubject,
              String someVerb,
              AbstractUser someObject,
              String someIndirectObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
someSubject - WRITEME
someVerb - WRITEME
someObject - WRITEME
someIndirectObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(AbstractUser someSubject,
              String someVerb,
              Object... optionalTrailer)
Create a new Action with only a subject, verb, and optional trailer records

Parameters:
someSubject - subject
someVerb - verb
optionalTrailer - optional trailer

Action

public Action(AbstractUser someSubject,
              String someVerb,
              String someIndirectObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
someSubject - WRITEME
someVerb - WRITEME
someIndirectObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(Room somewhere,
              AbstractUser someSubject,
              String someVerb,
              AbstractUser someObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
somewhere - WRITEME
someSubject - WRITEME
someVerb - WRITEME
someObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(Room somewhere,
              AbstractUser someSubject,
              String someVerb,
              AbstractUser someObject,
              String someIndirectObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
somewhere - WRITEME
someSubject - WRITEME
someVerb - WRITEME
someObject - WRITEME
someIndirectObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(Room newWhere,
              AbstractUser newSubject,
              String newVerb,
              Object... newTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
newWhere - WRITEME
newSubject - WRITEME
newVerb - WRITEME
newTrailer - WRITEME

Action

public Action(Room somewhere,
              AbstractUser someSubject,
              String someVerb,
              String someIndirectObject,
              Object... optionalTrailer)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
somewhere - WRITEME
someSubject - WRITEME
someVerb - WRITEME
someIndirectObject - WRITEME
optionalTrailer - WRITEME

Action

public Action(String justAVerb)
an Action with just a bare verb

Parameters:
justAVerb - just a verb

Action

public Action(String v,
              String dative)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
v - verb
dative - indirect object
Method Detail

getIndirectObject

public String getIndirectObject()
Returns:
the indirectObject

getObject

public AbstractUser getObject()
Returns:
the object

getSubject

public AbstractUser getSubject()
Returns:
the subject

getTrailer

public Object[] getTrailer()
Returns:
(a copy of) the trailer

getTrailer

public Object getTrailer(int n)
Get an item from the trailer, if it exists, or a “null” if not.

Parameters:
n - the index into the trailer records
Returns:
the object from the trailer, or a “null”

getTrailerString

public String getTrailerString(int n)
Get a string from the trailer, if it exists, or a zero-length string, if not.

Parameters:
n - the index into the trailer records
Returns:
the object from the trailer, if it exists, and is a string; else, a zero-length string ("")

getVerb

public String getVerb()
Returns:
the verb

getWhere

public Room getWhere()
Returns:
the where

log

public void log()
WRITEME: Document this method brpocock@star-hope.org