public enum ThreadLocalHelper extends Enum<ThreadLocalHelper>
Modifier and Type | Method and Description |
---|---|
static <T,A> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
A a,
java.util.function.Function<A,T> function) |
static <T,A> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
A a,
java.util.function.Function<A,T> function,
ReferenceQueue<T> referenceQueue,
java.util.function.Consumer<WeakReference<T>> refConsumer) |
static <T> T |
getTL(ThreadLocal<WeakReference<T>> threadLocal,
java.util.function.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@Nullable public static <T> T getTL(@NotNull ThreadLocal<WeakReference<T>> threadLocal, @NotNull java.util.function.Supplier<T> supplier)
@Nullable public static <T,A> T getTL(@NotNull ThreadLocal<WeakReference<T>> threadLocal, A a, @NotNull java.util.function.Function<A,T> function)
@Nullable public static <T,A> T getTL(@NotNull ThreadLocal<WeakReference<T>> threadLocal, A a, @NotNull java.util.function.Function<A,T> function, @Nullable ReferenceQueue<T> referenceQueue, @Nullable java.util.function.Consumer<WeakReference<T>> refConsumer)
Copyright © 2017. All rights reserved.