Package org.aksw.commons.util.memoize
Class MemoizedBiFunctionImpl<I1,I2,O>
java.lang.Object
org.aksw.commons.util.memoize.MemoizedBiFunctionImpl<I1,I2,O>
- All Implemented Interfaces:
BiFunction<I1,,I2, O> Memoized<Map.Entry<I1,,I2>, O> MemoizedBiFunction<I1,I2, O>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMemoizedBiFunctionImpl(BiFunction<I1, I2, O> delegate, Map<Map.Entry<I1, I2>, O> cache) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the cachestatic <I1,I2, O> MemoizedBiFunction<I1, I2, O> create(BiFunction<I1, I2, O> delegate) Create with backing by a ConcurrentHashMapstatic <I1,I2, O> MemoizedBiFunction<I1, I2, O> createNonConcurrent(BiFunction<I1, I2, O> delegate) Create with backing by a HashMapgetCache()Return a reference or copy to the memoized entriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
cache
-
delegate
-
-
Constructor Details
-
MemoizedBiFunctionImpl
-
-
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<I1,I2>
-
apply
- Specified by:
applyin interfaceBiFunction<I1,I2, O>
-
create
Create with backing by a ConcurrentHashMap -
createNonConcurrent
public static <I1,I2, MemoizedBiFunction<I1,O> I2, createNonConcurrentO> (BiFunction<I1, I2, O> delegate) Create with backing by a HashMap
-