ptolemy.data
Class UnsizedArrayToken
java.lang.Object
ptolemy.data.Token
ptolemy.data.AbstractNotConvertibleToken
ptolemy.data.ArrayToken
ptolemy.data.UnsizedArrayToken
- All Implemented Interfaces:
- java.io.Serializable
public class UnsizedArrayToken
- extends ArrayToken
A token that represents an array. This token type exists solely so
that types can be declared through the parameter mechanism using a
token value, since we don't represent types distinctly from tokens.
Generally speaking actors should process ArrayTokens, which properly
report their length.
- Since:
- Ptolemy II 6.1
- Version:
- $Id: UnsizedArrayToken.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Steve Neuendorffer
- See Also:
ArrayToken
,
Serialized Form
- Accepted Rating:
- Proposed Rating:
Constructor Summary |
UnsizedArrayToken(Type elementType)
Construct an empty array token with the given element type. |
Method Summary |
Type |
getType()
Return the type of this 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.ArrayToken |
_add, _divide, _divideReverse, _isCloseTo, _isEqualTo, _modulo, _moduloReverse, _multiply, _subtract, _subtractReverse, add, addReverse, append, arrayTokenToUnsignedByteArray, arrayValue, contains, divide, divideReverse, elementAdd, elementDivide, elementModulo, elementMultiply, elementMultiplyReturnType, elementSubtract, equals, extract, getElement, getElementType, hashCode, isNil, length, modulo, moduloReverse, multiply, multiplyReverse, one, subarray, subarray, subtract, subtractReverse, unsignedByteArrayToArrayToken, zero |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
UnsizedArrayToken
public UnsizedArrayToken(Type elementType)
- Construct an empty array token with the given element type.
- Parameters:
elementType
- A token type.
getType
public Type getType()
- Return the type of this token.
- Overrides:
getType
in class ArrayToken
- Returns:
- an unsized array type, having the correct element type.
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.
- Overrides:
toString
in class ArrayToken
- Returns:
- A string beginning with "{" that contains expressions
for every element in the array separated by commas, ending with "}".