Package ptolemy.data

Class 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)
    • 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 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 "}".