| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Context | |
| public static < the expected type of the associated value T> Optional | |
| public static < the expected type of the associated value T> T | |
| public static < the expected type of the associated value T> void | |
| public static boolean |
| ContextLocals | back to summary |
|---|---|
| private ContextLocals() | |
| ensureDuplicatedContext | back to summary |
|---|---|
| private static Context ensureDuplicatedContext() | |
| get | back to summary |
|---|---|
| public static <T> Optional Gets the value from the context local associated with the given key. | |
| get | back to summary |
|---|---|
| public static <T> T get(String key, T def) Gets the value from the context local associated with the given key. If there is no associated value, it returns the given default.
| |
| put | back to summary |
|---|---|
| public static <T> void put(String key, T value) Stores the given key/value in the context local. This method overwrite the existing value if any.
| |
| remove | back to summary |
|---|---|
| public static boolean remove(String key) Removes the value associated with the given key from the context locals.
| |