An environment with key bound to value; lookups for other keys
are forwarded to next.
An environment with key bound to value; lookups for other keys
are forwarded to next.
An environment without key.
An environment without key. Lookups for other keys
are forwarded to next.
Concatenate two environments with left-hand side precedence.
Concatenate two environments with left-hand side precedence.
An empty environment.
An empty environment. No keys are present.
Retrieve the current definition of a key.
Retrieve the current definition of a key.
NoSuchElementException when the key is undefined
in the current request-local context.
Tells whether key is defined in the current request-local
context.
Tells whether key is defined in the current request-local
context.
Retrieve the current definition of a key, but only if it is defined in the current request-local context.
Retrieve the current definition of a key, but only if it is defined in the current request-local context.
Retrieve the current definition of a key if it is defined.
Retrieve the current definition of a key if it is defined.
If it is not defined, orElse is evaluated and returned.
Bind two keys and values in the scope of fn.
Bind two keys and values in the scope of fn.
Bind value to key in the scope of fn.
Bind value to key in the scope of fn.
Clears all bindings in the scope of fn.
Clears all bindings in the scope of fn.
For example:
context.let(Key1, "value1") { context.let(Key2, "something else") { context.letClear() { // context.contains(Key1) == false // context.contains(Key2) == false } // context(Key1) == "value1" // context(Key2) == "something else" } }
Unbind the passed-in keys, in the scope of fn.
Unbind the passed-in keys, in the scope of fn.
A java-friendly key constructor.
A type of context that is local to the process. The type of Key is also unique (generative) to each instance of this context, so that keys cannot be used across different instances of this context type.