Package guru.mikelue.jdut.function
Class ValueSuppliers
- java.lang.Object
-
- guru.mikelue.jdut.function.ValueSuppliers
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Supplier<T>
cachedValue(Supplier<? extends T> sourceSupplier)
Builds a supplier which caches the value of source supplier.
-
-
-
Method Detail
-
cachedValue
public static <T> Supplier<T> cachedValue(Supplier<? extends T> sourceSupplier)
Builds a supplier which caches the value of source supplier.- Type Parameters:
T
- The type of result- Parameters:
sourceSupplier
- The source of supplier to be cached- Returns:
- The supplier supports caching value
-
-