Class ScopedValueContext.Snapshot
java.lang.Object
org.jdrupes.builder.core.ScopedValueContext.Snapshot
- Enclosing class:
ScopedValueContext
A snapshot of the the values of the registered scoped value instances.
-
Method Summary
Modifier and TypeMethodDescription<R, X extends Throwable>
Rcall(ScopedValue.CallableOp<? extends R, X> op) Short forcarriers().call(op).carriers()Returns the carriers for the values in the snapshot.voidShort forcarriers().run(task).where(ScopedValue<T> key, T value) Appends the scoped value and value to the carriers representing the snapshot and returns the result.where(Function<ScopedValue.Carrier, ScopedValue.Carrier> appender) Invokes the appender for adding scoped values to the snapshot and returns the result.
-
Method Details
-
carriers
Returns the carriers for the values in the snapshot.- Returns:
- the scoped value. carrier
-
where
Appends the scoped value and value to the carriers representing the snapshot and returns the result.- Type Parameters:
T- the generic type- Parameters:
key- the keyvalue- the value- Returns:
- the scoped value. carrier
-
where
Invokes the appender for adding scoped values to the snapshot and returns the result.- Type Parameters:
T- the generic type- Parameters:
appender- the appender- Returns:
- the scoped value. carrier
-
call
Short forcarriers().call(op).- Type Parameters:
R- the generic typeX- the generic type- Parameters:
op- the op- Returns:
- the r
- Throws:
X- the x
-
run
-