Interface Context<K,V>
public interface Context<K,V>
A context for managing references to server-side state.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent(K key, BiFunction<K, Runnable, V> factory) Returns the value associated with the specified key from this context, creating it from the specified factory, if necessary.
-
Method Details
-
computeIfAbsent
Returns the value associated with the specified key from this context, creating it from the specified factory, if necessary.- Parameters:
key- a key by which the value may be referencedfactory- a factory for creating the value if it does not already exist within this context.- Returns:
- the value, obtained from this context, or generated from the specified factory.
-