T
- type supplied to the store@FunctionalInterface public interface StoreSupplier<T>
Modifier and Type | Method and Description |
---|---|
static <T> StoreSupplier<T> |
cache(StoreSupplier<T> supplier)
Memoizes (caches) the supplied object, and returning it with an identical interface.
|
static <T> CachedSupplier<T,OperationFailedException> |
cacheResettable(StoreSupplier<T> supplier)
Memoizes (caches) the supplied object, and returning it with a
CachedSupplier
interface |
T |
get()
Gets the object being supplied to the store.
|
T get() throws OperationFailedException
OperationFailedException
- if anything goes wrongstatic <T> StoreSupplier<T> cache(StoreSupplier<T> supplier)
T
- type to supplysupplier
- supplier to cacheStoreSupplier
interface that memoizes the supplied objectstatic <T> CachedSupplier<T,OperationFailedException> cacheResettable(StoreSupplier<T> supplier)
CachedSupplier
interface
This interface can be used to reset and do other operations o the cache.
T
- type to supplysupplier
- supplier to cacheStoreSupplier
interface that memoizes the supplied objectCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.