public enum ThreadLocalHelper extends Enum<ThreadLocalHelper>
| Modifier and Type | Method and Description |
|---|---|
static <T,A> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
A a,
Function<A,T> function) |
static <T,A> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
A a,
Function<A,T> function,
ReferenceQueue<T> referenceQueue,
Consumer<WeakReference<T>> refConsumer) |
static <T> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
Supplier<T> supplier) |
static ThreadLocalHelper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ThreadLocalHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static ThreadLocalHelper[] values()
for (ThreadLocalHelper c : ThreadLocalHelper.values()) System.out.println(c);
public static ThreadLocalHelper valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@NotNull
public static <T> T getTL(@NotNull
ThreadLocal<WeakReference<T>> threadLocal,
@NotNull
Supplier<T> supplier)
@NotNull
public static <T,A> T getTL(@NotNull
ThreadLocal<WeakReference<T>> threadLocal,
A a,
@NotNull
Function<A,T> function)
@NotNull
public static <T,A> T getTL(@NotNull
ThreadLocal<WeakReference<T>> threadLocal,
A a,
@NotNull
Function<A,T> function,
@Nullable
ReferenceQueue<T> referenceQueue,
@Nullable
Consumer<WeakReference<T>> refConsumer)
Copyright © 2018. All rights reserved.