Package org.linkki.util
Class LazyReference<T>
- java.lang.Object
-
- org.linkki.util.LazyReference<T>
-
-
Constructor Summary
Constructors Constructor Description LazyReference(Supplier<T> supplier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Tget()TgetReference()Deprecated.Useget()instead.booleanisValuePresent()Returns whether a cached value is present.static <T> LazyReference<T>lazy(Supplier<T> supplier)
-
-
-
Method Detail
-
getReference
@Deprecated(since="2.2.0") public T getReference()
Deprecated.Useget()instead.
-
isValuePresent
public boolean isValuePresent()
Returns whether a cached value is present. A value oftrueindicates that the wrapped supplier has already been called and will not be called byget()anymore.
-
lazy
public static <T> LazyReference<T> lazy(Supplier<T> supplier)
-
-