Package net.sf.tweety.arg.adf.util
Class Cache<T,R>
- java.lang.Object
-
- net.sf.tweety.arg.adf.util.Cache<T,R>
-
- All Implemented Interfaces:
java.util.function.Function<T,R>
public class Cache<T,R> extends java.lang.Object implements java.util.function.Function<T,R>
-
-
Method Summary
Modifier and Type Method Description R
apply(T input)
R
put(T input, R output)
R
remove(T input)
void
setFunction(java.util.function.Function<T,R> function)
Sets the function which is used for future calls, but does not recompute already cached elements.int
size()
Returns the size of this cache
-