接口 ClearableLazy<T>

所有超级接口:
Lazy<T>, Supplier<T>
所有已知实现类:
ClearableLazy.Concurrent, ClearableLazy.Fast

public interface ClearableLazy<T> extends Lazy<T>
  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    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 object
    void
     
    static <T> ClearableLazy<T>
    of(@NotNull Supplier<T> supplier)
    Constructs a lazy-initialized object

    从接口继承的方法 java.util.function.Supplier

    get
  • 方法详细资料

    • invalidate

      void invalidate()
    • of

      static <T> ClearableLazy<T> of(@NotNull @NotNull Supplier<T> supplier)
      Constructs a lazy-initialized object
      参数:
      supplier - The supplier for the value, to be called the first time the value is needed.
    • concurrentOf

      static <T> ClearableLazy<T> concurrentOf(@NotNull @NotNull Supplier<T> supplier)
      Constructs a thread-safe lazy-initialized object
      参数:
      supplier - The supplier for the value, to be called the first time the value is needed.