Class DataMapEnvironment

  • All Implemented Interfaces:
    caltrop.interpreter.environment.Environment

    public class DataMapEnvironment
    extends java.lang.Object
    implements caltrop.interpreter.environment.Environment
    A read-only Environment that wraps a Map of data read from input ports.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Jörn W. Janneck
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DataMapEnvironment.UnboundPortVarException  
      • Nested classes/interfaces inherited from interface caltrop.interpreter.environment.Environment

        caltrop.interpreter.environment.Environment.StateVariableContainer, caltrop.interpreter.environment.Environment.VariableContainer
    • Constructor Summary

      Constructors 
      Constructor Description
      DataMapEnvironment​(caltrop.interpreter.ast.InputPattern[] inputPatterns, java.util.Map dataFromInputPorts, caltrop.interpreter.environment.Environment parentEnv, caltrop.interpreter.Context context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(java.lang.Object variable, java.lang.Object value)  
      void freezeLocal()  
      java.lang.Object get​(java.lang.Object variable)  
      java.lang.Object get​(java.lang.Object variable, java.lang.Object[] location)  
      boolean isLocalVar​(java.lang.Object variable)  
      java.util.Map localBindings()  
      java.util.Set localVars()  
      caltrop.interpreter.environment.Environment newFrame()  
      caltrop.interpreter.environment.Environment newFrame​(caltrop.interpreter.environment.Environment parent)  
      void set​(java.lang.Object variable, java.lang.Object value)  
      void set​(java.lang.Object variable, java.lang.Object[] location, java.lang.Object value)  
      • Methods inherited from class java.lang.Object

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

      • DataMapEnvironment

        public DataMapEnvironment​(caltrop.interpreter.ast.InputPattern[] inputPatterns,
                                  java.util.Map dataFromInputPorts,
                                  caltrop.interpreter.environment.Environment parentEnv,
                                  caltrop.interpreter.Context context)
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.Object variable)
        Specified by:
        get in interface caltrop.interpreter.environment.Environment
      • get

        public java.lang.Object get​(java.lang.Object variable,
                                    java.lang.Object[] location)
      • set

        public void set​(java.lang.Object variable,
                        java.lang.Object value)
        Specified by:
        set in interface caltrop.interpreter.environment.Environment
      • set

        public void set​(java.lang.Object variable,
                        java.lang.Object[] location,
                        java.lang.Object value)
        Specified by:
        set in interface caltrop.interpreter.environment.Environment
      • bind

        public void bind​(java.lang.Object variable,
                         java.lang.Object value)
        Specified by:
        bind in interface caltrop.interpreter.environment.Environment
      • localVars

        public java.util.Set localVars()
        Specified by:
        localVars in interface caltrop.interpreter.environment.Environment
      • localBindings

        public java.util.Map localBindings()
        Specified by:
        localBindings in interface caltrop.interpreter.environment.Environment
      • isLocalVar

        public boolean isLocalVar​(java.lang.Object variable)
        Specified by:
        isLocalVar in interface caltrop.interpreter.environment.Environment
      • newFrame

        public caltrop.interpreter.environment.Environment newFrame()
        Specified by:
        newFrame in interface caltrop.interpreter.environment.Environment
      • newFrame

        public caltrop.interpreter.environment.Environment newFrame​(caltrop.interpreter.environment.Environment parent)
        Specified by:
        newFrame in interface caltrop.interpreter.environment.Environment
      • freezeLocal

        public void freezeLocal()
        Specified by:
        freezeLocal in interface caltrop.interpreter.environment.Environment