Class DefaultContext

  • All Implemented Interfaces:
    Context

    public final class DefaultContext
    extends java.lang.Object
    implements Context
    A default implementation of the Context interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, java.lang.Object value)
      Adds a context entry.
      java.lang.Object get​(java.lang.String key)
      Searches for the value with the specified attribute key in this context.
      java.util.Collection<java.lang.String> getAttributeNames()
      Returns the names of all attributes of this context.
      • Methods inherited from class java.lang.Object

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

      • DefaultContext

        public DefaultContext()
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String key)
        Description copied from interface: Context
        Searches for the value with the specified attribute key in this context.
        Specified by:
        get in interface Context
        Parameters:
        key - the attribute key.
        Returns:
        the value in this context with the specified attribute key value.
      • getAttributeNames

        public java.util.Collection<java.lang.String> getAttributeNames()
        Description copied from interface: Context
        Returns the names of all attributes of this context.
        Specified by:
        getAttributeNames in interface Context
        Returns:
        the names of all attributes of this context.
      • add

        public void add​(java.lang.String key,
                        java.lang.Object value)
        Adds a context entry.
        Parameters:
        key - the context key
        value - the value for key