Class MapSearchContext

  • All Implemented Interfaces:
    SearchContext

    public class MapSearchContext
    extends Object
    implements SearchContext
    Map backed implementation of the SearchContext.
    Author:
    andrew.forrest@forgerock.com
    • Constructor Detail

      • MapSearchContext

        public MapSearchContext()
    • Method Detail

      • add

        public <T> void add​(ContextKey<T> key,
                            T value)
        Description copied from interface: SearchContext
        Add data to the context.
        Specified by:
        add in interface SearchContext
        Type Parameters:
        T - The value type.
        Parameters:
        key - The key.
        value - The value.
      • get

        public <T> T get​(ContextKey<T> key)
        Description copied from interface: SearchContext
        Get data from the context.
        Specified by:
        get in interface SearchContext
        Type Parameters:
        T - The value type.
        Parameters:
        key - The key for which to extract data.
        Returns:
        The value associated with the key.
      • has

        public boolean has​(ContextKey<?> key)
        Description copied from interface: SearchContext
        Whether the context contains data with the associated with the key.
        Specified by:
        has in interface SearchContext
        Parameters:
        key - The key.
        Returns:
        Whether data exists for the given key.
      • remove

        public void remove​(ContextKey<?> key)
        Description copied from interface: SearchContext
        Removes data from the context.
        Specified by:
        remove in interface SearchContext
        Parameters:
        key - The key.