Class PtolemyExpressionString


  • public class PtolemyExpressionString
    extends java.lang.Object
    A wrapper for a string containing a Ptolemy expression.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Constructor Summary

      Constructors 
      Constructor Description
      PtolemyExpressionString()
      Construct a Ptolemy expression string.
      PtolemyExpressionString​(NamedObj container)
      Construct a Ptolemy expression string with the given container as its scope.
      PtolemyExpressionString​(NamedObj container, java.lang.String value)
      Construct a Ptolemy expression string with the given container as its scope and the given value as its initial value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get()
      Get the current value.
      Token getToken()
      Evaluate the Ptolemy expression and return the result in a token.
      void set​(java.lang.String value)
      Set the value.
      java.lang.String toString()
      Return the Ptolemy expression in a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PtolemyExpressionString

        public PtolemyExpressionString()
        Construct a Ptolemy expression string.
      • PtolemyExpressionString

        public PtolemyExpressionString​(NamedObj container)
        Construct a Ptolemy expression string with the given container as its scope.
        Parameters:
        container - The container.
      • PtolemyExpressionString

        public PtolemyExpressionString​(NamedObj container,
                                       java.lang.String value)
        Construct a Ptolemy expression string with the given container as its scope and the given value as its initial value.
        Parameters:
        container - The container.
        value - The initial value.
    • Method Detail

      • get

        public java.lang.String get()
        Get the current value.
        Returns:
        The value.
        See Also:
        set(String)
      • set

        public void set​(java.lang.String value)
        Set the value.
        Parameters:
        value - The value.
        See Also:
        get()
      • toString

        public java.lang.String toString()
        Return the Ptolemy expression in a string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The Ptolemy expression.