Package org.eclipse.viatra.transformation.evm.api

## Class Context

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.api.Context

-     public class Context
      extends java.lang.Object

  A context is an associative store that is accessible during the execution of the EVM, and thus usable by the Sceduler, Executor, RuleBase, Rule Instances, Activations and Jobs. In order to separate different users from each other, values can be accessed (get/put/remove) with a key.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `Context()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `clear()` | Clears all data from the context.
    `static Context` | `create()` | Static helper method to create an empty Context.
    `java.lang.Object` | `get​(java.lang.String key)` | Returns the value corresponding to the given key.
    `java.lang.Object` | `put​(java.lang.String key, java.lang.Object value)` | Puts the value into the context with the given key
    `java.lang.Object` | `remove​(java.lang.String key)` | Removes any existing value for the given key from the context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Context

          protected Context()

  - ### Method Detail

    - #### create

          public static Context create()

      Static helper method to create an empty Context.

    - #### get

          public java.lang.Object get​(java.lang.String key)

      Returns the value corresponding to the given key.
      Parameters:
        `key` -
      Returns:
        the value in the context for the key

    - #### put

          public java.lang.Object put​(java.lang.String key,
                                      java.lang.Object value)

      Puts the value into the context with the given key
      Parameters:
        `key` -
        `value` -
      Returns:
        the previous value for the key, or null

    - #### remove

          public java.lang.Object remove​(java.lang.String key)

      Removes any existing value for the given key from the context.
      Parameters:
        `key` -
      Returns:
        the value if exists, null otherwise

    - #### clear

          protected void clear()

      Clears all data from the context.