| Type Params | Return Type | Name and description |
|---|---|---|
<R> |
public R |
call(Supplier<R> supplier)Executes the supplier with all bindings in this carrier active and returns its result. |
|
public void |
run(Runnable action)Executes the action with all bindings in this carrier active. |
<T> |
public Carrier |
where(ScopedLocal<T> key, T value)Adds another binding to this carrier, returning a new carrier that includes all previous bindings plus the new one. |
Executes the supplier with all bindings in this carrier active and returns its result.
R - the result typesupplier - the supplier to executeExecutes the action with all bindings in this carrier active.
action - the action to executeAdds another binding to this carrier, returning a new carrier that includes all previous bindings plus the new one.
T - the value typekey - the scoped-local to bindvalue - the value to bind; may be null