Package net.sf.tweety.arg.adf.util
Class CacheSupplier<T>
- java.lang.Object
-
- net.sf.tweety.arg.adf.util.CacheSupplier<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Supplier<T>
public class CacheSupplier<T> extends Object implements Supplier<T>
Delegates the first get() call to the given supplier and stores its result in cache. Consecutive calls return the cached result, therefore computation is only done once. Does not maintain a reference to the delegate once its result is computed.- Author:
- Mathias Hofer