Class ScopedValueContext.Snapshot

java.lang.Object
org.jdrupes.builder.core.ScopedValueContext.Snapshot
Enclosing class:
ScopedValueContext

public static final class ScopedValueContext.Snapshot extends Object
A snapshot of the the values of the registered scoped value instances.
  • Method Details

    • carriers

      Returns the carriers for the values in the snapshot.
      Returns:
      the scoped value. carrier
    • where

      public <T> ScopedValue.Carrier where(ScopedValue<T> key, T value)
      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 key
      value - 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

      public <R, X extends Throwable> R call(ScopedValue.CallableOp<? extends R, X> op) throws X
      Short for carriers().call(op).
      Type Parameters:
      R - the generic type
      X - the generic type
      Parameters:
      op - the op
      Returns:
      the r
      Throws:
      X - the x
    • run

      public void run(Runnable task)
      Short for carriers().run(task).
      Parameters:
      task - the task