# Uses of Class
jdk.incubator.concurrent.ScopedValue

Packages that use ScopedValue
Package
Description
jdk.incubator.concurrent
Defines non-final APIs for concurrent programming.

- ## Uses of ScopedValue in jdk.incubator.concurrent

  Methods in jdk.incubator.concurrent that return ScopedValue
  Modifier and Type
  Method
  Description
  `static <T> ScopedValue<T>`
  ScopedValue.`newInstance()`
  Creates a scoped value that is initially unbound for all threads.
  Methods in jdk.incubator.concurrent with parameters of type ScopedValue
  Modifier and Type
  Method
  Description
  `<T> T`
  ScopedValue.Carrier.`get(ScopedValue<T> key)`
  Returns the value of a `ScopedValue` in this mapping.
  `<T> ScopedValue.Carrier`
  ScopedValue.Carrier.`where(ScopedValue<T> key, T value)`
  Returns a new `Carrier` with the mappings from this carrier plus a new mapping from `key` to `value`.
  `static <T> ScopedValue.Carrier`
  ScopedValue.`where(ScopedValue<T> key, T value)`
  Creates a new `Carrier` with a single mapping of a `ScopedValue` key to a value.
  `static <T> void`
  ScopedValue.`where(ScopedValue<T> key, T value, Runnable op)`
  Run an operation with a `ScopedValue` bound to a value in the current thread.
  `static <T, R> R`
  ScopedValue.`where(ScopedValue<T> key, T value, Callable<? extends R> op)`
  Calls a value-returning operation with a `ScopedValue` bound to a value in the current thread.