public class ThreadLocal
extends java.lang.Object
Implementation of untyped thread-local storage.
Constructor and Description |
---|
ThreadLocal() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
Get the value of this thread-local for the current thread.
|
void |
set(java.lang.Object value)
Get the value of this thread-local for the current thread.
|
public java.lang.Object get()
Get the value of this thread-local for the current thread.
null
if no value has been set for this thread.public void set(java.lang.Object value)
Get the value of this thread-local for the current thread.
value
- (nullable) New value.