TMST.representation
Class Executor

java.lang.Object
  extended byEntityType
      extended byTMST.representation.Executor

public class Executor
extends EntityType

Class representing an agent which has volunteered to perform (or execute) an action.

See Also:
Serialized Form

Constructor Summary
Executor(Entity ent)
           
Executor(TMST tmst, java.lang.String name, java.lang.String description, Action action, java.lang.String costValue, java.lang.String reference)
           
 
Method Summary
 void addAction(java.lang.String actionName, java.lang.String costValue, java.lang.String reference)
          Method for adding an action to the executor
 Action[] getActions()
          Method returning all actions this executor may perform.
 Cost getCost(java.lang.String actionName)
          Method returning the specified cost.
 float getCostValue(java.lang.String actionName)
          Method returning the specified cost.
static boolean matches(Entity value)
          Overriding EntityType's method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executor

public Executor(TMST tmst,
                java.lang.String name,
                java.lang.String description,
                Action action,
                java.lang.String costValue,
                java.lang.String reference)
         throws NameAlreadyExistException

Executor

public Executor(Entity ent)
         throws EntityTypeNotMatchedException
Method Detail

getActions

public Action[] getActions()
Method returning all actions this executor may perform.

Returns:
Action[] All actions this executor may perform

addAction

public void addAction(java.lang.String actionName,
                      java.lang.String costValue,
                      java.lang.String reference)
               throws java.lang.Exception
Method for adding an action to the executor

Throws:
java.lang.Exception

getCost

public Cost getCost(java.lang.String actionName)
Method returning the specified cost. If this executor has no cost related to that action, null is returned.

Parameters:
actionName - The name of the action which cost information is requested
Returns:
Cost The cost of the this executor performing the specified action ()

getCostValue

public float getCostValue(java.lang.String actionName)
                   throws AlreadyHasValueException
Method returning the specified cost. If this executor has no cost related to that action, null is returned.

Parameters:
actionName - The name of the action which cost information is requested
Returns:
Cost The cost of the this executor performing the specified action ()
Throws:
AlreadyHasValueException

matches

public static boolean matches(Entity value)
Overriding EntityType's method