Interface Context

  • All Known Subinterfaces:
    UserSession
    All Known Implementing Classes:
    ContextImpl, SimulationSession, UserSessionImpl

    public interface Context
    ContextImpl type for storing values throughout a testing define. Each define - and thread respectfully, must have a single context instance bound.
    Since:
    1.0.0
    Author:
    Erhan Bagdemir
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends Context>
      T
      add​(java.lang.String key, java.lang.Object value)
      Puts a new key - value pair to the context.
      void commit​(java.lang.String status)  
      void empty()
      Empties the context.
      <T> java.util.Optional<T> get​(java.lang.String key)
      Reclaims the object from the context.
      boolean isEmpty()
      Checks whether the context is empty.
      void notify​(long time)  
      void register​(Measurement measurement)  
      void remove​(Measurement measurement)  
    • Method Detail

      • add

        <T extends Context> T add​(java.lang.String key,
                                  java.lang.Object value)
        Puts a new key - value pair to the context.
        Parameters:
        key - Key value.
        value - Value to store.
      • get

        <T> java.util.Optional<T> get​(java.lang.String key)
        Reclaims the object from the context.
        Type Parameters:
        T - The value stored in the context of type T
        Parameters:
        key - The key value.
        Returns:
        An Optional instance of T.
      • empty

        void empty()
        Empties the context.
      • isEmpty

        boolean isEmpty()
        Checks whether the context is empty.

        Returns:
        true if the context is empty.
      • notify

        void notify​(long time)
      • commit

        void commit​(java.lang.String status)