TMST.representation
Class Cost

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

public class Cost
extends EntityType

Class representing the cost of having an executor performing an action.

See Also:
Serialized Form

Constructor Summary
Cost(Entity ent)
           
Cost(TMST tmst, java.lang.String name, java.lang.String description, Entity owner, java.lang.String costValue)
           
 
Method Summary
 Executor getExecutor()
          Method returning the owner related to this cost.
 float getFloatValue()
          Returns the value of this cost entity as a float.
 ReplyReference getReplyReference()
          Method returning the reply reference related to this cost entity
 java.lang.String getStringValue()
          Returns the value of this cost entity as a string.
static boolean matches(Entity value)
           
 void setReplyReference(ReplyReference reference)
          Method for adding a reference to the Cost object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cost

public Cost(TMST tmst,
            java.lang.String name,
            java.lang.String description,
            Entity owner,
            java.lang.String costValue)
     throws NameAlreadyExistException

Cost

public Cost(Entity ent)
     throws EntityTypeNotMatchedException
Method Detail

setReplyReference

public void setReplyReference(ReplyReference reference)
                       throws AlreadyHasValueException
Method for adding a reference to the Cost object.

Parameters:
reference - The refrerence which is being addded to the costw.
Throws:
AlreadyHasValueException

getReplyReference

public ReplyReference getReplyReference()
                                 throws java.lang.Exception
Method returning the reply reference related to this cost entity

Returns:
String the name of the reply reference
Throws:
java.lang.Exception

getFloatValue

public float getFloatValue()
                    throws AlreadyHasValueException
Returns the value of this cost entity as a float. If the cost entity has no value, return positive infinity

Returns:
float The float value of the cost.
Throws:
AlreadyHasValueException

getStringValue

public java.lang.String getStringValue()
                                throws AlreadyHasValueException
Returns the value of this cost entity as a string. If the cost entity has no value, return positive infinity

Returns:
String The float value of the cost.
Throws:
AlreadyHasValueException

getExecutor

public Executor getExecutor()
                     throws AlreadyHasValueException
Method returning the owner related to this cost.

Returns:
Entity The owner of this cost entity
Throws:
AlreadyHasValueException

matches

public static boolean matches(Entity value)