Package org.aksw.commons.util.memoize
Class MemoizedFunctionImpl<I,O>
java.lang.Object
org.aksw.commons.util.memoize.MemoizedFunctionImpl<I,O>
- All Implemented Interfaces:
Function<I,,O> Memoized<I,,O> MemoizedFunction<I,O>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the cachestatic <I,O> MemoizedFunction<I, O> Create with backing by a ConcurrentHashMapstatic <I,O> MemoizedFunction<I, O> createNonConcurrent(Function<I, O> delegate) Create with backing by a HashMapgetCache()Return a reference or copy to the memoized entries
-
Field Details
-
cache
-
delegate
-
-
Constructor Details
-
MemoizedFunctionImpl
-
-
Method Details
-
getCache
Description copied from interface:MemoizedReturn a reference or copy to the memoized entries -
clearCache
public void clearCache()Description copied from interface:MemoizedClear the cache- Specified by:
clearCachein interfaceMemoized<I,O>
-
apply
-
create
Create with backing by a ConcurrentHashMap -
createNonConcurrent
Create with backing by a HashMap
-