Class SimpleExecutionEnvironment

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void commit()
      Called just after the VM is executed, to finalize information of the execution for the environment.
      java.lang.Object get​(java.lang.String id)  
      java.lang.Object get​(java.lang.String id, java.lang.Object defaultValue)  
      boolean has​(java.lang.String id)  
      java.util.Set<java.lang.String> keySet()  
      boolean put​(java.lang.String id, java.lang.Object v)  
      java.lang.Object remove​(java.lang.String id)  
      void setup()
      Called just before the VM is executed, to enable and preparations needed in the environment.
      • Methods inherited from class java.lang.Object

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

      • SimpleExecutionEnvironment

        public SimpleExecutionEnvironment()
    • Method Detail

      • has

        public boolean has​(java.lang.String id)
        Specified by:
        has in interface ExecutionEnvironment
        Parameters:
        id - the variable name
        Returns:
        true if the variable is present
      • get

        public java.lang.Object get​(java.lang.String id)
        Specified by:
        get in interface ExecutionEnvironment
        Parameters:
        id - the variable name
        Returns:
        the value of the variable if present, false otherwise
      • get

        public java.lang.Object get​(java.lang.String id,
                                    java.lang.Object defaultValue)
        Specified by:
        get in interface ExecutionEnvironment
        Parameters:
        id - the variable name
        defaultValue - a parameterizable default value
        Returns:
        the value of the variable if present, defaultValue otherwise
      • put

        public boolean put​(java.lang.String id,
                           java.lang.Object v)
        Specified by:
        put in interface ExecutionEnvironment
        Parameters:
        id - the variable name
        v - the value that should be associated with id
        Returns:
        true if there was previously a value associated with id, and false if not.
      • remove

        public java.lang.Object remove​(java.lang.String id)
        Specified by:
        remove in interface ExecutionEnvironment
        Parameters:
        id - the variable name
        Returns:
        Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Specified by:
        keySet in interface ExecutionEnvironment
        Returns:
        An unmodifiable set of the keys in the ExecutionEnvironment
      • commit

        public void commit()
        Description copied from interface: ExecutionEnvironment
        Called just after the VM is executed, to finalize information of the execution for the environment.
        Specified by:
        commit in interface ExecutionEnvironment
      • setup

        public void setup()
        Description copied from interface: ExecutionEnvironment
        Called just before the VM is executed, to enable and preparations needed in the environment.
        Specified by:
        setup in interface ExecutionEnvironment