Package ptolemy.data
Class UnsizedArrayToken
- java.lang.Object
-
- ptolemy.data.Token
-
- ptolemy.data.AbstractNotConvertibleToken
-
- ptolemy.data.ArrayToken
-
- ptolemy.data.UnsizedArrayToken
-
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$
- Author:
- Steve Neuendorffer
- See Also:
ArrayToken
- Pt.AcceptedRating:
- Yellow (neuendor)
- Pt.ProposedRating:
- Yellow (neuendor)
-
-
Field Summary
-
Fields inherited from class ptolemy.data.ArrayToken
_depth, _elementType, NIL
-
-
Constructor Summary
Constructors Constructor Description UnsizedArrayToken(Type elementType)
Construct an empty array token with the given element type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, append, arrayTokenToUnsignedByteArray, arrayValue, contains, divide, divideReverse, elementAdd, elementDivide, elementModulo, elementMultiply, elementMultiplyReturnType, elementSubtract, equals, extract, getElement, getElementType, hashCode, isCloseTo, isNil, length, modulo, moduloReverse, multiply, multiplyReverse, one, reverse, subarray, subarray, subtract, subtractReverse, unsignedByteArrayToArrayToken, update, zero
-
Methods inherited from class ptolemy.data.AbstractNotConvertibleToken
isEqualTo, notSupportedDifferentClassesMessage
-
Methods inherited from class ptolemy.data.Token
isCloseTo, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, notSupportedNullNilStringMessage, pow, zeroReturnType
-
-
-
-
Constructor Detail
-
UnsizedArrayToken
public UnsizedArrayToken(Type elementType)
Construct an empty array token with the given element type.- Parameters:
elementType
- A token type.
-
-
Method Detail
-
getType
public Type getType()
Return the type of this token.- Overrides:
getType
in classArrayToken
- 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 classArrayToken
- Returns:
- A string beginning with "{" that contains expressions for every element in the array separated by commas, ending with "}".
-
-