Interface SearchContext
-
- All Known Implementing Classes:
MapSearchContext
public interface SearchContextSearch context provides a shared data space for a given search. This allows tree nodes to share information.- Author:
- andrew.forrest@forgerock.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> voidadd(ContextKey<T> key, T value)Add data to the context.<T> Tget(ContextKey<T> key)Get data from the context.booleanhas(ContextKey<?> key)Whether the context contains data with the associated with the key.voidremove(ContextKey<?> key)Removes data from the context.
-
-
-
Method Detail
-
add
<T> void add(ContextKey<T> key, T value)
Add data to the context.- Type Parameters:
T- The value type.- Parameters:
key- The key.value- The value.
-
get
<T> T get(ContextKey<T> key)
Get data from the context.- Type Parameters:
T- The value type.- Parameters:
key- The key for which to extract data.- Returns:
- The value associated with the key.
-
has
boolean has(ContextKey<?> key)
Whether the context contains data with the associated with the key.- Parameters:
key- The key.- Returns:
- Whether data exists for the given key.
-
remove
void remove(ContextKey<?> key)
Removes data from the context.- Parameters:
key- The key.
-
-