- Type Parameters:
T
- Return value type.
- All Implemented Interfaces:
Supplier<T>
public class MemoizedSupplier<T>
extends Object
implements Supplier<T>
A supplier that caches the value after the first retrieval.
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MemoizedSupplier
public MemoizedSupplier(Supplier<T> valueSupplier)
-
MemoizedSupplier
public MemoizedSupplier(T value)
-