ptolemy.data
Class ActorToken
java.lang.Object
ptolemy.data.Token
ptolemy.data.ActorToken
- All Implemented Interfaces:
- java.io.Serializable
- public class ActorToken
- extends Token
A token that contains an actor. This token allows components to be
moved around in a model. One subtlety is that actors are not,
generally immutable objects. In order to prevent the actor
transmitted from appearing in multiple places in a model, and the
semantic fuzziness that would result, the actor is always cloned when
being retrieved from this token.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: ActorToken.java,v 1.15 2004/04/13 17:39:41 cxh Exp $
- Author:
- Steve Neuendorffer
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
|
Method Summary |
Entity |
getEntity()
Return a clone of the entity contained by this token. |
Type |
getType()
Return the type of this token. |
BooleanToken |
isEqualTo(Token token)
Model for equality of the values of this Token and the argument Token.
|
java.lang.String |
toString()
Return the value of this token as a string that can be parsed
by the expression language to recover a token with the same value.
|
| Methods inherited from class ptolemy.data.Token |
add, addReverse, divide, divideReverse, isCloseTo, isCloseTo, modulo, moduloReverse, multiply, multiplyReverse, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, one, pow, subtract, subtractReverse, zero, zeroReturnType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TYPE
public static final Type TYPE
ActorToken
public ActorToken(Entity entity)
throws IllegalActionException
getEntity
public Entity getEntity()
- Return a clone of the entity contained by this token.
getType
public Type getType()
- Return the type of this token.
- Overrides:
getType in class Token
- Returns:
- the type of this token.
isEqualTo
public BooleanToken isEqualTo(Token token)
throws IllegalActionException
- Model for equality of the values of this Token and the argument Token.
It should be overridden in derived classes to provide type specific
actions for equality testing.
- Overrides:
isEqualTo in class Token
- Parameters:
token - The token with which to test equality.
- Returns:
- A BooleanToken which contains the result of the test.
- Throws:
IllegalActionException - If this method is not
supported by the derived class.
toString
public java.lang.String toString()
- Return the value of this token as a string that can be parsed
by the expression language to recover a token with the same value.
This method should be overridden by derived classes.
In this base class, return the String "present" to indicate
that an event is present.
- Overrides:
toString in class Token
- Returns:
- The String "present".