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