Class DefaultContext

  • All Implemented Interfaces:
    Context

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

      • DefaultContext

        public DefaultContext()
    • Method Detail

      • get

        public Object get​(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 Collection<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​(String key,
                        Object value)
        Adds a context entry.
        Parameters:
        key - the context key
        value - the value for key