接口 ClearableLazy<T>
- 所有已知实现类:
ClearableLazy.Concurrent
,ClearableLazy.Fast
-
嵌套类概要
嵌套类修饰符和类型接口说明static final class
Thread-safe implementation.static final class
Non-thread-safe implementation. -
方法概要
修饰符和类型方法说明static <T> ClearableLazy
<T> concurrentOf
(@NotNull Supplier<T> supplier) Constructs a thread-safe lazy-initialized objectvoid
static <T> ClearableLazy
<T> Constructs a lazy-initialized object
-
方法详细资料
-
invalidate
void invalidate() -
of
Constructs a lazy-initialized object- 参数:
supplier
- The supplier for the value, to be called the first time the value is needed.
-
concurrentOf
Constructs a thread-safe lazy-initialized object- 参数:
supplier
- The supplier for the value, to be called the first time the value is needed.
-