Class StringParameter

    • Constructor Detail

      • StringParameter

        public StringParameter​(NamedObj container,
                               java.lang.String name)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a parameter with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This parameter will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. The object is not added to the list of objects in the workspace unless the container is null. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of the parameter.
        Throws:
        IllegalActionException - If the parameter is not of an acceptable class for the container.
        NameDuplicationException - If the name coincides with a parameter already in the container.
    • Method Detail

      • stringValue

        public java.lang.String stringValue()
                                     throws IllegalActionException
        Return the string value of this parameter. This is equivalent to
             ((StringToken)this.getToken()).stringValue()
          
        Returns:
        The string value of this parameter.
        Throws:
        IllegalActionException - If the expression cannot be parsed or cannot be evaluated, or if the result of evaluation violates type constraints, or if the result of evaluation is null and there are variables that depend on this one.