Package io.deephaven.util.datastructures
Class LazyCachingSupplier<T>
java.lang.Object
io.deephaven.util.datastructures.LazyCachingSupplier<T>
- All Implemented Interfaces:
Supplier<T>
public final class LazyCachingSupplier<T> extends Object implements Supplier<T>
Supplier
wrapper that caches the result in a SoftReference
. Only suitable to wrap suppliers that are
safely repeatable and don't return null
.-
Constructor Summary
Constructors Constructor Description LazyCachingSupplier(Supplier<T> internalSupplier)
Construct aSupplier
wrapper. -
Method Summary