-
- 类型参数:
T
- the value type
- 所有超级接口:
java.util.function.Supplier<T>
public interface Lazy<T> extends java.util.function.Supplier<T>
Supplier that only compute value only once.If error occurred when compute value, the exception would be thrown, and the next call will run the code again. If computed value is null, a NPE would be thrown.
-
-
方法详细资料
-
of
static <T> Lazy<T> of(java.util.function.Supplier<T> supplier)
Create one new Lazy instance.- 类型参数:
T
- the value type- 参数:
supplier
- provider the value- 返回:
- the created lazy value
-
-