public final class MoreSuppliers extends Object
Modifier and Type | Method and Description |
---|---|
static <X,T> Supplier<T> |
curry(Function<? super X,T> func,
X arg) |
static <T> Supplier<T> |
softMemoize(Supplier<T> supplier)
Softly memoize a supplier.
|
static <T> Supplier<T> |
weakMemoize(Supplier<T> supplier)
Weakly memoize a supplier.
|
public static <T> Supplier<T> weakMemoize(Supplier<T> supplier)
T
- The type returned by the supplier.supplier
- The supplier to memoize. The supplier cannot return null.supplier
with a weak reference.public static <T> Supplier<T> softMemoize(Supplier<T> supplier)
T
- The type returned by the supplier.supplier
- The supplier to memoize. The supplier cannot return null.supplier
with a soft reference.