story.scheherazade.elements
Class Action

java.lang.Object
  extended by story.scheherazade.elements.Action
All Implemented Interfaces:
CloneableObject, RenderableObject, Predicate
Direct Known Subclasses:
ValidAction

public class Action
extends java.lang.Object
implements RenderableObject, Predicate, CloneableObject

An Action is a physical or psychological change that makes one state differ from another. This is a "concrete," or instantiated Action, which means that it is associated with whatever properties are needed for instantiation, but not inherently assigned to a particular transition. For example, this is not "the property of going" or "John went to the store," but "going to the store."

In order to construct an Action the type of action must have already been "declared" in Timeline.


Constructor Summary
Action(ActionType actionType, SCHArguments arguments, int truthDegree, PredicateMode mode)
           
 
Method Summary
 boolean equals(Action other)
          Determines if this Action is equivalent to some other.
 PredicateMode getMode()
          Get the mode of the action.
 PredicateFlavor getPredicateFlavor()
           
 SCHArguments getSCHArguments()
          Get the arguments used to instantiate this Action
 int getTruthDegree()
          Get the degree of this action's truth in effect.
 ActionType getType()
          Get the ID of the type of action.
 Action makeClone()
           
 java.lang.StringBuffer render()
           
static java.lang.StringBuffer render(ActionType actionType, SCHArguments arguments, int truthDegree, PredicateMode mode)
          A static function that renders a ActionType and arguments as they would be rendered if they were part of an Action.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action(ActionType actionType,
              SCHArguments arguments,
              int truthDegree,
              PredicateMode mode)
       throws Scheherexception
Throws:
Scheherexception
Method Detail

getType

public ActionType getType()
Get the ID of the type of action.


getSCHArguments

public SCHArguments getSCHArguments()
                             throws Scheherexception
Get the arguments used to instantiate this Action

Throws:
Scheherexception

getTruthDegree

public int getTruthDegree()
Get the degree of this action's truth in effect.


getMode

public PredicateMode getMode()
Get the mode of the action.


render

public java.lang.StringBuffer render()
                              throws Scheherexception
Specified by:
render in interface RenderableObject
Throws:
Scheherexception

render

public static java.lang.StringBuffer render(ActionType actionType,
                                            SCHArguments arguments,
                                            int truthDegree,
                                            PredicateMode mode)
                                     throws Scheherexception
A static function that renders a ActionType and arguments as they would be rendered if they were part of an Action. Does not validate to make sure such an Action would be legal.

Throws:
Scheherexception

equals

public boolean equals(Action other)
               throws Scheherexception
Determines if this Action is equivalent to some other.

Throws:
Scheherexception

getPredicateFlavor

public PredicateFlavor getPredicateFlavor()
Specified by:
getPredicateFlavor in interface Predicate

makeClone

public Action makeClone()
                 throws Scheherexception
Specified by:
makeClone in interface CloneableObject
Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.