|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ThreadLocal<T>
public class ThreadLocal<T>
A variable for which each thread has its own value. Supports null
values.
Thread| Nested Class Summary | |
|---|---|
(package private) static class |
ThreadLocal.Values
Per-thread map of ThreadLocal instances to values. |
| Constructor Summary | |
|---|---|
ThreadLocal()
Creates a new thread local variable. |
|
| Method Summary | |
|---|---|
T |
get()
Returns the value of this variable for the current thread. |
(package private) ThreadLocal.Values |
initializeValues(Thread current)
Creates Values instance for this thread and variable type. |
protected T |
initialValue()
Provides the initial value of this variable for the current thread. |
void |
remove()
Removes the entry for this variable in the current thread. |
void |
set(T value)
Sets the value of this variable for the current thread. |
(package private) ThreadLocal.Values |
values(Thread current)
Gets Values instance for this thread and variable type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadLocal()
| Method Detail |
|---|
public T get()
initialValue().
protected T initialValue()
null.
public void set(T value)
public void remove()
get() before a #set(T),
#get() will call initialValue() and create a new
entry with the resulting value.
ThreadLocal.Values initializeValues(Thread current)
ThreadLocal.Values values(Thread current)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||