Factory for lightweight wrappers that store the result of a potentially expensive function call. Each method of this class exposes two of the following features:
Default cache
The memoizer uses the default cache of this factory. Current implementation creates a new
ConcurrentMap per memoizer.
The memoizer uses the default BiFunction or Supplier to calculate the cache key for each call. Either
uses the natural key (e.g. the input itself) or one of the methods in MemoizationDefaults.
The memoizer uses a user-provided ConcurrentMap as its cache. It is possible to add
values to the cache both before and after the memoizer was created. In case a Map subtype is provided that is
not a subclass of ConcurrentMap as well, the map entries will be copied to a new
ConcurrentHashMap.
The memoizer uses a user-defined BiFunction or Supplier to calculate the cache key for each call.
Take a look at MemoizationDefaults for a possible key functions and suppliers.
- See Also:
-
BiConsumerBiFunctionBiPredicateBooleanSupplierCallableConsumerDoubleBinaryOperatorDoubleConsumerDoubleFunctionDoublePredicateDoubleSupplierDoubleToIntFunctionDoubleToLongFunctionDoubleUnaryOperatorFunctionIntBinaryOperatorIntConsumerIntFunctionIntPredicateIntSupplierIntToDoubleFunctionIntToLongFunctionIntUnaryOperatorLongBinaryOperatorLongConsumerLongFunctionLongPredicateLongSupplierLongToDoubleFunctionLongToIntFunctionLongUnaryOperatorObjDoubleConsumerObjIntConsumerObjLongConsumerPredicateRunnableSupplierToDoubleBiFunctionToIntBiFunctionToLongBiFunctionToDoubleFunctionToIntFunctionToLongFunction- Wikipedia: Memoization
-
Method Summary
Modifier and TypeMethodDescriptionstatic <FIRST,SECOND>
BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer) Memoizes aBiConsumerin aConcurrentMap.static <FIRST,SECOND, KEY>
BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aBiConsumerin aConcurrentMap.static <FIRST,SECOND, KEY>
BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aBiConsumerin aConcurrentMap.static <FIRST,SECOND>
BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, Map<Integer, Integer> cache) Memoizes aBiConsumerin aConcurrentMap.static <FIRST,SECOND, OUTPUT>
BiFunction<FIRST,SECOND, OUTPUT> biFunction(BiFunction<FIRST, SECOND, OUTPUT> biFunction) Memoizes aBiFunctionin aConcurrentMap.static <KEY,FIRST, SECOND, OUTPUT>
BiFunction<FIRST,SECOND, OUTPUT> biFunction(BiFunction<FIRST, SECOND, OUTPUT> biFunction, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aBiFunctionin aConcurrentMap.static <KEY,FIRST, SECOND, OUTPUT>
BiFunction<FIRST,SECOND, OUTPUT> biFunction(BiFunction<FIRST, SECOND, OUTPUT> biFunction, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes aBiFunctionin aConcurrentMap.static <FIRST,SECOND, OUTPUT>
BiFunction<FIRST,SECOND, OUTPUT> biFunction(BiFunction<FIRST, SECOND, OUTPUT> biFunction, Map<Integer, OUTPUT> cache) Memoizes aBiFunctionin aConcurrentMap.static <FIRST,SECOND>
BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate) Memoizes aBiPredicatein aConcurrentMap.static <KEY,FIRST, SECOND>
BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aBiPredicatein aConcurrentMap.static <KEY,FIRST, SECOND>
BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes aBiPredicatein aConcurrentMap.static <FIRST,SECOND>
BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, Map<Integer, Boolean> cache) Memoizes aBiPredicatein aConcurrentMap.static BooleanSupplierbooleanSupplier(BooleanSupplier supplier) Memoizes aBooleanSupplierin aConcurrentMap.static <KEY> BooleanSupplierbooleanSupplier(BooleanSupplier supplier, Supplier<KEY> keySupplier) Memoizes aBooleanSupplierin aConcurrentMap.static <KEY> BooleanSupplierbooleanSupplier(BooleanSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Boolean> cache) Memoizes aBooleanSupplierin aConcurrentMap.static BooleanSupplierbooleanSupplier(BooleanSupplier supplier, Map<Integer, Boolean> cache) Memoizes aBooleanSupplierin aConcurrentMap.static <OUTPUT> Callable<OUTPUT>Memoizes aCallablein aConcurrentMap.static <KEY,OUTPUT>
Callable<OUTPUT>Memoizes aCallablein aConcurrentMap.static <KEY,OUTPUT>
Callable<OUTPUT>Memoizes aCallablein aConcurrentMap.static <OUTPUT> Callable<OUTPUT>Memoizes aCallablein aConcurrentMap.static <INPUT> Consumer<INPUT>Memoizes aConsumerin aConcurrentMap.static <KEY,INPUT>
Consumer<INPUT>Memoizes aConsumerin aConcurrentMap.static <KEY,INPUT>
Consumer<INPUT>Memoizes aConsumerin aConcurrentMap.static <INPUT> Consumer<INPUT>Memoizes aConsumerin aConcurrentMap.static DoubleBinaryOperatordoubleBinaryOperator(DoubleBinaryOperator operator) Memoizes aDoubleBinaryOperatorin aConcurrentMap.static DoubleBinaryOperatordoubleBinaryOperator(DoubleBinaryOperator operator, Map<Integer, Double> cache) Memoizes aDoubleBinaryOperatorin aConcurrentMap.static <KEY> DoubleBinaryOperatordoubleBinaryOperator(DoubleBinaryOperator operator, DoubleBinaryFunction<KEY> keyFunction) Memoizes aDoubleBinaryOperatorin aConcurrentMap.static <KEY> DoubleBinaryOperatordoubleBinaryOperator(DoubleBinaryOperator operator, DoubleBinaryFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes aDoubleBinaryOperatorin aConcurrentMap.static DoubleConsumerdoubleConsumer(DoubleConsumer consumer) Memoizes aDoubleConsumerin aConcurrentMap.static <KEY> DoubleConsumerdoubleConsumer(DoubleConsumer consumer, DoubleFunction<KEY> keyFunction) Memoizes aDoubleConsumerin aConcurrentMap.static <KEY> DoubleConsumerdoubleConsumer(DoubleConsumer consumer, DoubleFunction<KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aDoubleConsumerin aConcurrentMap.static DoubleConsumerdoubleConsumer(DoubleConsumer consumer, Map<Double, Double> cache) Memoizes aDoubleConsumerin aConcurrentMap.static <OUTPUT> DoubleFunction<OUTPUT>doubleFunction(DoubleFunction<OUTPUT> function) Memoizes aDoubleFunctionin aConcurrentMap.static <KEY,OUTPUT>
DoubleFunction<OUTPUT>doubleFunction(DoubleFunction<OUTPUT> function, DoubleFunction<KEY> keyFunction) Memoizes aDoubleFunctionin aConcurrentMap.static <KEY,OUTPUT>
DoubleFunction<OUTPUT>doubleFunction(DoubleFunction<OUTPUT> function, DoubleFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes aDoubleFunctionin aConcurrentMap.static <OUTPUT> DoubleFunction<OUTPUT>doubleFunction(DoubleFunction<OUTPUT> function, Map<Double, OUTPUT> cache) Memoizes aDoubleFunctionin aConcurrentMap.static DoublePredicatedoublePredicate(DoublePredicate predicate) Memoizes aDoublePredicatein aConcurrentMap.static <KEY> DoublePredicatedoublePredicate(DoublePredicate predicate, DoubleFunction<KEY> keyFunction) Memoizes aDoublePredicatein aConcurrentMap.static <KEY> DoublePredicatedoublePredicate(DoublePredicate predicate, DoubleFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes aDoublePredicatein aConcurrentMap.static DoublePredicatedoublePredicate(DoublePredicate predicate, Map<Double, Boolean> cache) Memoizes aDoublePredicatein aConcurrentMap.static DoubleSupplierdoubleSupplier(DoubleSupplier supplier) Memoizes aDoubleSupplierin aConcurrentMap.static <KEY> DoubleSupplierdoubleSupplier(DoubleSupplier supplier, Supplier<KEY> keySupplier) Memoizes aDoubleSupplierin aConcurrentMap.static <KEY> DoubleSupplierdoubleSupplier(DoubleSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Double> cache) Memoizes aDoubleSupplierin aConcurrentMap.static DoubleSupplierdoubleSupplier(DoubleSupplier supplier, Map<Integer, Double> cache) Memoizes aDoubleSupplierin aConcurrentMap.static DoubleToIntFunctiondoubleToIntFunction(DoubleToIntFunction function) Memoizes aDoubleToIntFunctionin aConcurrentMap.static <KEY> DoubleToIntFunctiondoubleToIntFunction(DoubleToIntFunction function, DoubleFunction<KEY> keyFunction) Memoizes aDoubleToIntFunctionin aConcurrentMap.static <KEY> DoubleToIntFunctiondoubleToIntFunction(DoubleToIntFunction function, DoubleFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aDoubleToIntFunctionin aConcurrentMap.static DoubleToIntFunctiondoubleToIntFunction(DoubleToIntFunction function, Map<Double, Integer> cache) Memoizes aDoubleToIntFunctionin aConcurrentMap.static DoubleToLongFunctiondoubleToLongFunction(DoubleToLongFunction function) Memoizes aDoubleToLongFunctionin aConcurrentMap.static <KEY> DoubleToLongFunctiondoubleToLongFunction(DoubleToLongFunction function, DoubleFunction<KEY> keyFunction) Memoizes aDoubleToLongFunctionin aConcurrentMap.static <KEY> DoubleToLongFunctiondoubleToLongFunction(DoubleToLongFunction function, DoubleFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes aDoubleToLongFunctionin aConcurrentMap.static DoubleToLongFunctiondoubleToLongFunction(DoubleToLongFunction function, Map<Double, Long> cache) Memoizes aDoubleToLongFunctionin aConcurrentMap.static DoubleUnaryOperatordoubleUnaryOperator(DoubleUnaryOperator operator) Memoizes aDoubleUnaryOperatorin aConcurrentMap.static <KEY> DoubleUnaryOperatordoubleUnaryOperator(DoubleUnaryOperator operator, DoubleFunction<KEY> keyFunction) Memoizes aDoubleUnaryOperatorin aConcurrentMap.static <KEY> DoubleUnaryOperatordoubleUnaryOperator(DoubleUnaryOperator operator, DoubleFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes aDoubleUnaryOperatorin aConcurrentMap.static DoubleUnaryOperatordoubleUnaryOperator(DoubleUnaryOperator operator, Map<Double, Double> cache) Memoizes aDoubleUnaryOperatorin aConcurrentMap.static <INPUT,OUTPUT>
Function<INPUT,OUTPUT> Memoizes aFunctionin aConcurrentMap.static <INPUT,KEY, OUTPUT>
Function<INPUT,OUTPUT> Memoizes aFunctionin aConcurrentMap.static <INPUT,KEY, OUTPUT>
Function<INPUT,OUTPUT> Memoizes aFunctionin aConcurrentMap.static <INPUT,OUTPUT>
Function<INPUT,OUTPUT> Memoizes aFunctionin aConcurrentMap.static IntBinaryOperatorintBinaryOperator(IntBinaryOperator operator) Memoizes aIntBinaryOperatorin aConcurrentMap.static IntBinaryOperatorintBinaryOperator(IntBinaryOperator operator, Map<Integer, Integer> cache) Memoizes aIntBinaryOperatorin aConcurrentMap.static <KEY> IntBinaryOperatorintBinaryOperator(IntBinaryOperator operator, IntBinaryFunction<KEY> keyFunction) Memoizes aIntBinaryOperatorin aConcurrentMap.static <KEY> IntBinaryOperatorintBinaryOperator(IntBinaryOperator operator, IntBinaryFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aIntBinaryOperatorin aConcurrentMap.static IntConsumerintConsumer(IntConsumer consumer) Memoizes aIntConsumerin aConcurrentMap.static <KEY> IntConsumerintConsumer(IntConsumer consumer, IntFunction<KEY> keyFunction) Memoizes aIntConsumerin aConcurrentMap.static <KEY> IntConsumerintConsumer(IntConsumer consumer, IntFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aIntConsumerin aConcurrentMap.static IntConsumerintConsumer(IntConsumer consumer, Map<Integer, Integer> cache) Memoizes aIntConsumerin aConcurrentMap.static <OUTPUT> IntFunction<OUTPUT>intFunction(IntFunction<OUTPUT> function) Memoizes aIntFunctionin aConcurrentMap.static <KEY,OUTPUT>
IntFunction<OUTPUT>intFunction(IntFunction<OUTPUT> function, IntFunction<KEY> keyFunction) Memoizes aIntFunctionin aConcurrentMap.static <KEY,OUTPUT>
IntFunction<OUTPUT>intFunction(IntFunction<OUTPUT> function, IntFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes aIntFunctionin aConcurrentMap.static <OUTPUT> IntFunction<OUTPUT>intFunction(IntFunction<OUTPUT> function, Map<Integer, OUTPUT> cache) Memoizes aIntFunctionin aConcurrentMap.static IntPredicateintPredicate(IntPredicate predicate) Memoizes aIntPredicatein aConcurrentMap.static <KEY> IntPredicateintPredicate(IntPredicate predicate, IntFunction<KEY> keyFunction) Memoizes aIntPredicatein aConcurrentMap.static <KEY> IntPredicateintPredicate(IntPredicate predicate, IntFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes aIntPredicatein aConcurrentMap.static IntPredicateintPredicate(IntPredicate predicate, Map<Integer, Boolean> cache) Memoizes aIntPredicatein aConcurrentMap.static IntSupplierintSupplier(IntSupplier supplier) Memoizes aIntSupplierin aConcurrentMap.static <KEY> IntSupplierintSupplier(IntSupplier supplier, Supplier<KEY> keySupplier) Memoizes aIntSupplierin aConcurrentMap.static <KEY> IntSupplierintSupplier(IntSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Integer> cache) Memoizes aIntSupplierin aConcurrentMap.static IntSupplierintSupplier(IntSupplier supplier, Map<Integer, Integer> cache) Memoizes aIntSupplierin aConcurrentMap.static IntToDoubleFunctionintToDoubleFunction(IntToDoubleFunction function) Memoizes aIntToDoubleFunctionin aConcurrentMap.static <KEY> IntToDoubleFunctionintToDoubleFunction(IntToDoubleFunction function, IntFunction<KEY> keyFunction) Memoizes aIntToDoubleFunctionin aConcurrentMap.static <KEY> IntToDoubleFunctionintToDoubleFunction(IntToDoubleFunction function, IntFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes aIntToDoubleFunctionin aConcurrentMap.static IntToDoubleFunctionintToDoubleFunction(IntToDoubleFunction function, Map<Integer, Double> cache) Memoizes aIntToDoubleFunctionin aConcurrentMap.static IntToLongFunctionintToLongFunction(IntToLongFunction function) Memoizes aIntToLongFunctionin aConcurrentMap.static <KEY> IntToLongFunctionintToLongFunction(IntToLongFunction function, IntFunction<KEY> keyFunction) Memoizes aIntToLongFunctionin aConcurrentMap.static <KEY> IntToLongFunctionintToLongFunction(IntToLongFunction function, IntFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes aIntToLongFunctionin aConcurrentMap.static IntToLongFunctionintToLongFunction(IntToLongFunction function, Map<Integer, Long> cache) Memoizes aIntToLongFunctionin aConcurrentMap.static IntUnaryOperatorintUnaryOperator(IntUnaryOperator operator) Memoizes aIntUnaryOperatorin aConcurrentMap.static <KEY> IntUnaryOperatorintUnaryOperator(IntUnaryOperator operator, IntFunction<KEY> keyFunction) Memoizes aIntUnaryOperatorin aConcurrentMap.static <KEY> IntUnaryOperatorintUnaryOperator(IntUnaryOperator operator, IntFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aIntUnaryOperatorin aConcurrentMap.static IntUnaryOperatorintUnaryOperator(IntUnaryOperator operator, Map<Integer, Integer> cache) Memoizes aIntUnaryOperatorin aConcurrentMap.static LongBinaryOperatorlongBinaryOperator(LongBinaryOperator operator) Memoizes aLongBinaryOperatorin aConcurrentMap.static LongBinaryOperatorlongBinaryOperator(LongBinaryOperator operator, Map<Integer, Long> cache) Memoizes aLongBinaryOperatorin aConcurrentMap.static <KEY> LongBinaryOperatorlongBinaryOperator(LongBinaryOperator operator, LongBinaryFunction<KEY> keyFunction) Memoizes aLongBinaryOperatorin aConcurrentMap.static <KEY> LongBinaryOperatorlongBinaryOperator(LongBinaryOperator operator, LongBinaryFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes aLongBinaryOperatorin aConcurrentMap.static LongConsumerlongConsumer(LongConsumer consumer) Memoizes aLongConsumerin aConcurrentMap.static <KEY> LongConsumerlongConsumer(LongConsumer consumer, LongFunction<KEY> keyFunction) Memoizes aLongConsumerin aConcurrentMap.static <KEY> LongConsumerlongConsumer(LongConsumer consumer, LongFunction<KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aLongConsumerin aConcurrentMap.static LongConsumerlongConsumer(LongConsumer consumer, Map<Long, Long> cache) Memoizes aLongConsumerin aConcurrentMap.static <OUTPUT> LongFunction<OUTPUT>longFunction(LongFunction<OUTPUT> function) Memoizes aLongFunctionin aConcurrentMap.static <KEY,OUTPUT>
LongFunction<OUTPUT>longFunction(LongFunction<OUTPUT> function, LongFunction<KEY> keyFunction) Memoizes aLongFunctionin aConcurrentMap.static <KEY,OUTPUT>
LongFunction<OUTPUT>longFunction(LongFunction<OUTPUT> function, LongFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes aLongFunctionin aConcurrentMap.static <OUTPUT> LongFunction<OUTPUT>longFunction(LongFunction<OUTPUT> function, Map<Long, OUTPUT> cache) Memoizes aLongFunctionin aConcurrentMap.static LongPredicatelongPredicate(LongPredicate predicate) Memoizes aLongPredicatein aConcurrentMap.static <KEY> LongPredicatelongPredicate(LongPredicate predicate, LongFunction<KEY> keyFunction) Memoizes aLongPredicatein aConcurrentMap.static <KEY> LongPredicatelongPredicate(LongPredicate predicate, LongFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes aLongPredicatein aConcurrentMap.static LongPredicatelongPredicate(LongPredicate predicate, Map<Long, Boolean> cache) Memoizes aLongPredicatein aConcurrentMap.static LongSupplierlongSupplier(LongSupplier supplier) Memoizes aLongSupplierin aConcurrentMap.static <KEY> LongSupplierlongSupplier(LongSupplier supplier, Supplier<KEY> keySupplier) Memoizes aLongSupplierin aConcurrentMap.static <KEY> LongSupplierlongSupplier(LongSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Long> cache) Memoizes aLongSupplierin aConcurrentMap.static LongSupplierlongSupplier(LongSupplier supplier, Map<Integer, Long> cache) Memoizes aLongSupplierin aConcurrentMap.static LongToDoubleFunctionlongToDoubleFunction(LongToDoubleFunction function) Memoizes aLongToDoubleFunctionin aConcurrentMap.static <KEY> LongToDoubleFunctionlongToDoubleFunction(LongToDoubleFunction function, LongFunction<KEY> keyFunction) Memoizes aLongToDoubleFunctionin aConcurrentMap.static <KEY> LongToDoubleFunctionlongToDoubleFunction(LongToDoubleFunction function, LongFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes aLongToDoubleFunctionin aConcurrentMap.static LongToDoubleFunctionlongToDoubleFunction(LongToDoubleFunction function, Map<Long, Double> cache) Memoizes aLongToDoubleFunctionin aConcurrentMap.static LongToIntFunctionlongToIntFunction(LongToIntFunction function) Memoizes aLongToIntFunctionin aConcurrentMap.static <KEY> LongToIntFunctionlongToIntFunction(LongToIntFunction function, LongFunction<KEY> keyFunction) Memoizes aLongToIntFunctionin aConcurrentMap.static <KEY> LongToIntFunctionlongToIntFunction(LongToIntFunction function, LongFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aLongToIntFunctionin aConcurrentMap.static LongToIntFunctionlongToIntFunction(LongToIntFunction function, Map<Long, Integer> cache) Memoizes aLongToIntFunctionin aConcurrentMap.static LongUnaryOperatorlongUnaryOperator(LongUnaryOperator operator) Memoizes aLongUnaryOperatorin aConcurrentMap.static <KEY> LongUnaryOperatorlongUnaryOperator(LongUnaryOperator operator, LongFunction<KEY> keyFunction) Memoizes aLongUnaryOperatorin aConcurrentMap.static <KEY> LongUnaryOperatorlongUnaryOperator(LongUnaryOperator operator, LongFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes aLongUnaryOperatorin aConcurrentMap.static LongUnaryOperatorlongUnaryOperator(LongUnaryOperator operator, Map<Long, Long> cache) Memoizes aLongUnaryOperatorin aConcurrentMap.static <INPUT> ObjDoubleConsumer<INPUT>objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer) Memoizes aObjDoubleConsumerin aConcurrentMap.static <INPUT> ObjDoubleConsumer<INPUT>objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes aObjDoubleConsumerin aConcurrentMap.static <KEY,INPUT>
ObjDoubleConsumer<INPUT>objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, ObjDoubleFunction<INPUT, KEY> keyFunction) Memoizes aObjDoubleConsumerin aConcurrentMap.static <KEY,INPUT>
ObjDoubleConsumer<INPUT>objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, ObjDoubleFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aObjDoubleConsumerin aConcurrentMap.static <INPUT> ObjIntConsumer<INPUT>objIntConsumer(ObjIntConsumer<INPUT> consumer) Memoizes aObjIntConsumerin aConcurrentMap.static <INPUT> ObjIntConsumer<INPUT>objIntConsumer(ObjIntConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes aObjIntConsumerin aConcurrentMap.static <KEY,INPUT>
ObjIntConsumer<INPUT>objIntConsumer(ObjIntConsumer<INPUT> consumer, ObjIntFunction<INPUT, KEY> keyFunction) Memoizes aObjIntConsumerin aConcurrentMap.static <KEY,INPUT>
ObjIntConsumer<INPUT>objIntConsumer(ObjIntConsumer<INPUT> consumer, ObjIntFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aObjIntConsumerin aConcurrentMap.static <INPUT> ObjLongConsumer<INPUT>objLongConsumer(ObjLongConsumer<INPUT> consumer) Memoizes aObjLongConsumerin aConcurrentMap.static <INPUT> ObjLongConsumer<INPUT>objLongConsumer(ObjLongConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes aObjLongConsumerin aConcurrentMap.static <KEY,INPUT>
ObjLongConsumer<INPUT>objLongConsumer(ObjLongConsumer<INPUT> consumer, ObjLongFunction<INPUT, KEY> keyFunction) Memoizes aObjLongConsumerin aConcurrentMap.static <KEY,INPUT>
ObjLongConsumer<INPUT>objLongConsumer(ObjLongConsumer<INPUT> consumer, ObjLongFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes aObjLongConsumerin aConcurrentMap.static <INPUT> Predicate<INPUT>Memoizes aPredicatein aConcurrentMap.static <KEY,INPUT>
Predicate<INPUT>Memoizes aPredicatein aConcurrentMap.static <KEY,INPUT>
Predicate<INPUT>Memoizes aPredicatein aConcurrentMap.static <INPUT> Predicate<INPUT>Memoizes aPredicatein aConcurrentMap.static RunnableMemoizes aRunnablein aConcurrentMap.static <KEY> RunnableMemoizes aRunnablein aConcurrentMap.static <KEY> RunnableMemoizes aRunnablein aConcurrentMap.static RunnableMemoizes aRunnablein aConcurrentMap.static <OUTPUT> Supplier<OUTPUT>Memoizes aSupplierin aConcurrentMap.static <KEY,OUTPUT>
Supplier<OUTPUT>Memoizes aSupplierin aConcurrentMap.static <KEY,OUTPUT>
Supplier<OUTPUT>Memoizes aSupplierin aConcurrentMap.static <OUTPUT> Supplier<OUTPUT>Memoizes aSupplierin aConcurrentMap.static <FIRST,SECOND>
ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function) Memoizes aToDoubleBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aToDoubleBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Double> cache) Memoizes aToDoubleBiFunctionin aConcurrentMap.static <FIRST,SECOND>
ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, Map<Integer, Double> cache) Memoizes aToDoubleBiFunctionin aConcurrentMap.static <INPUT> ToDoubleFunction<INPUT>toDoubleFunction(ToDoubleFunction<INPUT> function) Memoizes aToDoubleFunctionin aConcurrentMap.static <KEY,INPUT>
ToDoubleFunction<INPUT>toDoubleFunction(ToDoubleFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes aToDoubleFunctionin aConcurrentMap.static <KEY,INPUT>
ToDoubleFunction<INPUT>toDoubleFunction(ToDoubleFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Double> cache) Memoizes aToDoubleFunctionin aConcurrentMap.static <INPUT> ToDoubleFunction<INPUT>toDoubleFunction(ToDoubleFunction<INPUT> function, Map<INPUT, Double> cache) Memoizes aToDoubleFunctionin aConcurrentMap.static <FIRST,SECOND>
ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function) Memoizes aToIntBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aToIntBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aToIntBiFunctionin aConcurrentMap.static <FIRST,SECOND>
ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, Map<Integer, Integer> cache) Memoizes aToIntBiFunctionin aConcurrentMap.static <INPUT> ToIntFunction<INPUT>toIntFunction(ToIntFunction<INPUT> function) Memoizes aToIntFunctionin aConcurrentMap.static <KEY,INPUT>
ToIntFunction<INPUT>toIntFunction(ToIntFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes aToIntFunctionin aConcurrentMap.static <KEY,INPUT>
ToIntFunction<INPUT>toIntFunction(ToIntFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Integer> cache) Memoizes aToIntFunctionin aConcurrentMap.static <INPUT> ToIntFunction<INPUT>toIntFunction(ToIntFunction<INPUT> function, Map<INPUT, Integer> cache) Memoizes aToIntFunctionin aConcurrentMap.static <FIRST,SECOND>
ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function) Memoizes aToLongBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes aToLongBiFunctionin aConcurrentMap.static <FIRST,SECOND, KEY>
ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Long> cache) Memoizes aToLongBiFunctionin aConcurrentMap.static <FIRST,SECOND>
ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, Map<Integer, Long> cache) Memoizes aToLongBiFunctionin aConcurrentMap.static <INPUT> ToLongFunction<INPUT>toLongFunction(ToLongFunction<INPUT> function) Memoizes aToLongFunctionin aConcurrentMap.static <KEY,INPUT>
ToLongFunction<INPUT>toLongFunction(ToLongFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes aToLongFunctionin aConcurrentMap.static <KEY,INPUT>
ToLongFunction<INPUT>toLongFunction(ToLongFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Long> cache) Memoizes aToLongFunctionin aConcurrentMap.static <INPUT> ToLongFunction<INPUT>toLongFunction(ToLongFunction<INPUT> function, Map<INPUT, Long> cache) Memoizes aToLongFunctionin aConcurrentMap.
-
Method Details
-
callable
Memoizes a
Callablein aConcurrentMap.- Default cache
- Default cache key
-
callable
@CheckReturnValue public static <OUTPUT> Callable<OUTPUT> callable(Callable<OUTPUT> callable, Map<Integer, OUTPUT> cache) Memoizes a
Callablein aConcurrentMap.- Custom cache
- Default cache key
-
callable
@CheckReturnValue public static <KEY,OUTPUT> Callable<OUTPUT> callable(Callable<OUTPUT> callable, Supplier<KEY> keySupplier) Memoizes a
Callablein aConcurrentMap.- Default cache
- Custom cache key
-
callable
@CheckReturnValue public static <KEY,OUTPUT> Callable<OUTPUT> callable(Callable<OUTPUT> callable, Supplier<KEY> keySupplier, Map<KEY, OUTPUT> cache) Memoizes a
Callablein aConcurrentMap.- Custom cache
- Custom cache key
-
runnable
Memoizes a
Runnablein aConcurrentMap.- Default cache
- Default cache key
-
runnable
Memoizes a
Runnablein aConcurrentMap.- Custom cache
- Default cache key
-
runnable
@CheckReturnValue public static <KEY> Runnable runnable(Runnable runnable, Supplier<KEY> keySupplier) Memoizes a
Runnablein aConcurrentMap.- Default cache
- Custom cache key
-
runnable
@CheckReturnValue public static <KEY> Runnable runnable(Runnable runnable, Supplier<KEY> keySupplier, Map<KEY, KEY> cache) Memoizes a
Runnablein aConcurrentMap.- Custom cache
- Custom cache key
-
biConsumer
@CheckReturnValue public static <FIRST,SECOND> BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer) Memoizes a
BiConsumerin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
biConsumer- TheBiConsumerto memoize.- Returns:
- The wrapped
BiConsumer.
-
biConsumer
@CheckReturnValue public static <FIRST,SECOND, BiConsumer<FIRST,KEY> SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
BiConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
biConsumer- TheBiConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
BiConsumer.
-
biConsumer
@CheckReturnValue public static <FIRST,SECOND> BiConsumer<FIRST,SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, Map<Integer, Integer> cache) Memoizes a
BiConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
biConsumer- TheBiConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiConsumer.
-
biConsumer
@CheckReturnValue public static <FIRST,SECOND, BiConsumer<FIRST,KEY> SECOND> biConsumer(BiConsumer<FIRST, SECOND> biConsumer, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
BiConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
biConsumer- TheBiConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiConsumer.
-
biFunction
@CheckReturnValue public static <FIRST,SECOND, BiFunction<FIRST,OUTPUT> SECOND, biFunctionOUTPUT> (BiFunction<FIRST, SECOND, OUTPUT> biFunction) Memoizes a
BiFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.OUTPUT- The type of the output/cache value.- Parameters:
biFunction- TheBiFunctionto memoize.- Returns:
- The wrapped
BiFunction.
-
biFunction
@CheckReturnValue public static <KEY,FIRST, BiFunction<FIRST,SECOND, OUTPUT> SECOND, biFunctionOUTPUT> (BiFunction<FIRST, SECOND, OUTPUT> biFunction, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
BiFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.FIRST- The type of the first parameter.SECOND- The type of the second parameter.OUTPUT- The type of the output/cache value.- Parameters:
biFunction- TheBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
BiFunction.
-
biFunction
@CheckReturnValue public static <FIRST,SECOND, BiFunction<FIRST,OUTPUT> SECOND, biFunctionOUTPUT> (BiFunction<FIRST, SECOND, OUTPUT> biFunction, Map<Integer, OUTPUT> cache) Memoizes a
BiFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.OUTPUT- The type of the output/cache value.- Parameters:
biFunction- TheBiFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiFunction.
-
biFunction
@CheckReturnValue public static <KEY,FIRST, BiFunction<FIRST,SECOND, OUTPUT> SECOND, biFunctionOUTPUT> (BiFunction<FIRST, SECOND, OUTPUT> biFunction, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes a
BiFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.FIRST- The type of the first parameter.SECOND- The type of the second parameter.OUTPUT- The type of the output/cache value.- Parameters:
biFunction- TheBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiFunction.
-
biPredicate
@CheckReturnValue public static <FIRST,SECOND> BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate) Memoizes a
BiPredicatein aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
predicate- TheBiPredicateto memoize.- Returns:
- The wrapped
BiPredicate.
-
biPredicate
@CheckReturnValue public static <KEY,FIRST, BiPredicate<FIRST,SECOND> SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
BiPredicatein aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
KEY- The type of the cache key.FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
predicate- TheBiPredicateto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
BiPredicate.
-
biPredicate
@CheckReturnValue public static <FIRST,SECOND> BiPredicate<FIRST,SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, Map<Integer, Boolean> cache) Memoizes a
BiPredicatein aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
predicate- TheBiPredicateto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiPredicate.
-
biPredicate
@CheckReturnValue public static <KEY,FIRST, BiPredicate<FIRST,SECOND> SECOND> biPredicate(BiPredicate<FIRST, SECOND> predicate, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes a
BiPredicatein aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
predicate- TheBiPredicateto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
BiPredicate.
-
booleanSupplier
Memoizes a
BooleanSupplierin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
supplier- TheSupplierto memoize.- Returns:
- The wrapped
BooleanSupplier.
-
booleanSupplier
@CheckReturnValue public static BooleanSupplier booleanSupplier(BooleanSupplier supplier, Map<Integer, Boolean> cache) Memoizes a
BooleanSupplierin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
supplier- TheBooleanSupplierto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
BooleanSupplier.
-
booleanSupplier
@CheckReturnValue public static <KEY> BooleanSupplier booleanSupplier(BooleanSupplier supplier, Supplier<KEY> keySupplier) Memoizes a
BooleanSupplierin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheBooleanSupplierto memoize.keySupplier- TheSupplierfor the cache key.- Returns:
- The wrapped
BooleanSupplier.
-
booleanSupplier
@CheckReturnValue public static <KEY> BooleanSupplier booleanSupplier(BooleanSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Boolean> cache) Memoizes a
BooleanSupplierin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheBooleanSupplierto memoize.keySupplier- TheSupplierfor the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
BooleanSupplier.
-
consumer
Memoizes a
Consumerin aConcurrentMap.- Default cache
- Default cache key
-
consumer
@CheckReturnValue public static <KEY,INPUT> Consumer<INPUT> consumer(Consumer<INPUT> consumer, Function<INPUT, KEY> keyFunction) Memoizes a
Consumerin aConcurrentMap.- Default cache
- Custom cache key
-
consumer
@CheckReturnValue public static <INPUT> Consumer<INPUT> consumer(Consumer<INPUT> consumer, Map<INPUT, INPUT> cache) Memoizes a
Consumerin aConcurrentMap.- Custom cache
- Default cache key
-
consumer
@CheckReturnValue public static <KEY,INPUT> Consumer<INPUT> consumer(Consumer<INPUT> consumer, Function<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
Consumerin aConcurrentMap.- Custom cache
- Custom cache key
-
doubleBinaryOperator
@CheckReturnValue public static DoubleBinaryOperator doubleBinaryOperator(DoubleBinaryOperator operator) Memoizes a
DoubleBinaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheDoubleBinaryOperatorto memoize.- Returns:
- The wrapped
DoubleBinaryOperator.
-
doubleBinaryOperator
@CheckReturnValue public static <KEY> DoubleBinaryOperator doubleBinaryOperator(DoubleBinaryOperator operator, DoubleBinaryFunction<KEY> keyFunction) Memoizes a
DoubleBinaryOperatorin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheDoubleBinaryOperatorto memoize.keyFunction- TheDoubleBinaryFunctionto compute the cache key.- Returns:
- The wrapped
DoubleBinaryOperator.
-
doubleBinaryOperator
@CheckReturnValue public static <KEY> DoubleBinaryOperator doubleBinaryOperator(DoubleBinaryOperator operator, DoubleBinaryFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
DoubleBinaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheDoubleBinaryOperatorto memoize.keyFunction- TheDoubleBinaryFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleBinaryOperator.
-
doubleBinaryOperator
@CheckReturnValue public static DoubleBinaryOperator doubleBinaryOperator(DoubleBinaryOperator operator, Map<Integer, Double> cache) Memoizes a
DoubleBinaryOperatorin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
operator- TheDoubleBinaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleBinaryOperator.
-
doubleConsumer
Memoizes a
DoubleConsumerin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
consumer- TheDoubleConsumerto memoize.- Returns:
- The wrapped
DoubleConsumer.
-
doubleConsumer
@CheckReturnValue public static <KEY> DoubleConsumer doubleConsumer(DoubleConsumer consumer, DoubleFunction<KEY> keyFunction) Memoizes a
DoubleConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheDoubleConsumerto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoubleConsumer.
-
doubleConsumer
@CheckReturnValue public static <KEY> DoubleConsumer doubleConsumer(DoubleConsumer consumer, DoubleFunction<KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
DoubleConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheDoubleConsumerto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleConsumer.
-
doubleConsumer
@CheckReturnValue public static DoubleConsumer doubleConsumer(DoubleConsumer consumer, Map<Double, Double> cache) Memoizes a
DoubleConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
consumer- TheDoubleConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleConsumer.
-
doubleFunction
@CheckReturnValue public static <OUTPUT> DoubleFunction<OUTPUT> doubleFunction(DoubleFunction<OUTPUT> function) Memoizes a
DoubleFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output.- Parameters:
function- TheDoubleFunctionto memoize.- Returns:
- The wrapped
DoubleFunction.
-
doubleFunction
@CheckReturnValue public static <KEY,OUTPUT> DoubleFunction<OUTPUT> doubleFunction(DoubleFunction<OUTPUT> function, DoubleFunction<KEY> keyFunction) Memoizes a
DoubleFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output.- Parameters:
function- TheDoubleFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoubleFunction.
-
doubleFunction
@CheckReturnValue public static <KEY,OUTPUT> DoubleFunction<OUTPUT> doubleFunction(DoubleFunction<OUTPUT> function, DoubleFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes a
DoubleFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output.- Parameters:
function- TheDoubleFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleFunction.
-
doubleFunction
@CheckReturnValue public static <OUTPUT> DoubleFunction<OUTPUT> doubleFunction(DoubleFunction<OUTPUT> function, Map<Double, OUTPUT> cache) Memoizes a
DoubleFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output.- Parameters:
function- TheDoubleFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleFunction.
-
doublePredicate
Memoizes a
DoublePredicatein aConcurrentMap.- Default cache
- Default cache key
- Parameters:
predicate- TheDoublePredicateto memoize.- Returns:
- The wrapped
DoublePredicate.
-
doublePredicate
@CheckReturnValue public static <KEY> DoublePredicate doublePredicate(DoublePredicate predicate, DoubleFunction<KEY> keyFunction) Memoizes a
DoublePredicatein aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheDoublePredicateto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoublePredicate.
-
doublePredicate
@CheckReturnValue public static <KEY> DoublePredicate doublePredicate(DoublePredicate predicate, DoubleFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes a
DoublePredicatein aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheDoublePredicateto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoublePredicate.
-
doublePredicate
@CheckReturnValue public static DoublePredicate doublePredicate(DoublePredicate predicate, Map<Double, Boolean> cache) Memoizes a
DoublePredicatein aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
predicate- TheDoublePredicateto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoublePredicate.
-
doubleSupplier
Memoizes a
DoubleSupplierin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
supplier- TheSupplierto memoize.- Returns:
- The wrapped
DoubleSupplier.
-
doubleSupplier
@CheckReturnValue public static DoubleSupplier doubleSupplier(DoubleSupplier supplier, Map<Integer, Double> cache) Memoizes a
DoubleSupplierin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
supplier- TheDoubleSupplierto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleSupplier.
-
doubleSupplier
@CheckReturnValue public static <KEY> DoubleSupplier doubleSupplier(DoubleSupplier supplier, Supplier<KEY> keySupplier) Memoizes a
DoubleSupplierin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheDoubleSupplierto memoize.keySupplier- TheSupplierfor the cache key.- Returns:
- The wrapped
DoubleSupplier.
-
doubleSupplier
@CheckReturnValue public static <KEY> DoubleSupplier doubleSupplier(DoubleSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Double> cache) Memoizes a
DoubleSupplierin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheDoubleSupplierto memoize.keySupplier- TheSupplierfor the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleSupplier.
-
doubleToIntFunction
@CheckReturnValue public static DoubleToIntFunction doubleToIntFunction(DoubleToIntFunction function) Memoizes a
DoubleToIntFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheDoubleToIntFunctionto memoize.- Returns:
- The wrapped
DoubleToIntFunction.
-
doubleToIntFunction
@CheckReturnValue public static <KEY> DoubleToIntFunction doubleToIntFunction(DoubleToIntFunction function, DoubleFunction<KEY> keyFunction) Memoizes a
DoubleToIntFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheDoubleToIntFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoubleToIntFunction.
-
doubleToIntFunction
@CheckReturnValue public static <KEY> DoubleToIntFunction doubleToIntFunction(DoubleToIntFunction function, DoubleFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
DoubleToIntFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheDoubleToIntFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleToIntFunction.
-
doubleToIntFunction
@CheckReturnValue public static DoubleToIntFunction doubleToIntFunction(DoubleToIntFunction function, Map<Double, Integer> cache) Memoizes a
DoubleToIntFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheDoubleToIntFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleToIntFunction.
-
doubleToLongFunction
@CheckReturnValue public static DoubleToLongFunction doubleToLongFunction(DoubleToLongFunction function) Memoizes a
DoubleToLongFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheDoubleToLongFunctionto memoize.- Returns:
- The wrapped
DoubleToLongFunction.
-
doubleToLongFunction
@CheckReturnValue public static <KEY> DoubleToLongFunction doubleToLongFunction(DoubleToLongFunction function, DoubleFunction<KEY> keyFunction) Memoizes a
DoubleToLongFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheDoubleToLongFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoubleToLongFunction.
-
doubleToLongFunction
@CheckReturnValue public static <KEY> DoubleToLongFunction doubleToLongFunction(DoubleToLongFunction function, DoubleFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
DoubleToLongFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheDoubleToLongFunctionto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleToLongFunction.
-
doubleToLongFunction
@CheckReturnValue public static DoubleToLongFunction doubleToLongFunction(DoubleToLongFunction function, Map<Double, Long> cache) Memoizes a
DoubleToLongFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheDoubleToLongFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleToLongFunction.
-
doubleUnaryOperator
@CheckReturnValue public static DoubleUnaryOperator doubleUnaryOperator(DoubleUnaryOperator operator) Memoizes a
DoubleUnaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheDoubleUnaryOperatorto memoize.- Returns:
- The wrapped
DoubleUnaryOperator.
-
doubleUnaryOperator
@CheckReturnValue public static <KEY> DoubleUnaryOperator doubleUnaryOperator(DoubleUnaryOperator operator, DoubleFunction<KEY> keyFunction) Memoizes a
DoubleUnaryOperatorin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheDoubleUnaryOperatorto memoize.keyFunction- TheDoubleFunctionto compute the cache key.- Returns:
- The wrapped
DoubleUnaryOperator.
-
doubleUnaryOperator
@CheckReturnValue public static <KEY> DoubleUnaryOperator doubleUnaryOperator(DoubleUnaryOperator operator, DoubleFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
DoubleUnaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheDoubleUnaryOperatorto memoize.keyFunction- TheDoubleFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleUnaryOperator.
-
doubleUnaryOperator
@CheckReturnValue public static DoubleUnaryOperator doubleUnaryOperator(DoubleUnaryOperator operator, Map<Double, Double> cache) Memoizes a
DoubleUnaryOperatorin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
operator- TheDoubleUnaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
DoubleUnaryOperator.
-
function
@CheckReturnValue public static <INPUT,OUTPUT> Function<INPUT,OUTPUT> function(Function<INPUT, OUTPUT> function) Memoizes a
Functionin aConcurrentMap.- Default cache
- Default cache key
-
function
@CheckReturnValue public static <INPUT,KEY, Function<INPUT,OUTPUT> OUTPUT> function(Function<INPUT, OUTPUT> function, Function<INPUT, KEY> keyFunction) Memoizes a
Functionin aConcurrentMap.- Default cache
- Custom cache key
-
function
@CheckReturnValue public static <INPUT,OUTPUT> Function<INPUT,OUTPUT> function(Function<INPUT, OUTPUT> function, Map<INPUT, OUTPUT> cache) Memoizes a
Functionin aConcurrentMap.- Custom cache
- Default cache key
-
function
@CheckReturnValue public static <INPUT,KEY, Function<INPUT,OUTPUT> OUTPUT> function(Function<INPUT, OUTPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes a
Functionin aConcurrentMap.- Custom cache
- Custom cache key
-
intBinaryOperator
Memoizes a
IntBinaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheIntBinaryOperatorto memoize.- Returns:
- The wrapped
IntBinaryOperator.
-
intBinaryOperator
@CheckReturnValue public static <KEY> IntBinaryOperator intBinaryOperator(IntBinaryOperator operator, IntBinaryFunction<KEY> keyFunction) Memoizes a
IntBinaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheIntBinaryOperatorto memoize.keyFunction- TheIntBinaryFunctionto compute the cache key.- Returns:
- The wrapped
IntBinaryOperator.
-
intBinaryOperator
@CheckReturnValue public static <KEY> IntBinaryOperator intBinaryOperator(IntBinaryOperator operator, IntBinaryFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
IntBinaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheIntBinaryOperatorto memoize.keyFunction- TheIntBinaryFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntBinaryOperator.
-
intBinaryOperator
@CheckReturnValue public static IntBinaryOperator intBinaryOperator(IntBinaryOperator operator, Map<Integer, Integer> cache) Memoizes a
IntBinaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Parameters:
operator- TheIntBinaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntBinaryOperator.
-
intConsumer
Memoizes a
IntConsumerin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
consumer- TheIntConsumerto memoize.- Returns:
- The wrapped
IntConsumer.
-
intConsumer
@CheckReturnValue public static <KEY> IntConsumer intConsumer(IntConsumer consumer, IntFunction<KEY> keyFunction) Memoizes a
IntConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheIntConsumerto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntConsumer.
-
intConsumer
@CheckReturnValue public static <KEY> IntConsumer intConsumer(IntConsumer consumer, IntFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
IntConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheIntConsumerto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntConsumer.
-
intConsumer
@CheckReturnValue public static IntConsumer intConsumer(IntConsumer consumer, Map<Integer, Integer> cache) Memoizes a
IntConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
consumer- TheIntConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntConsumer.
-
intFunction
@CheckReturnValue public static <OUTPUT> IntFunction<OUTPUT> intFunction(IntFunction<OUTPUT> function) Memoizes a
IntFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output/cache value.- Parameters:
function- TheIntFunctionto memoize.- Returns:
- The wrapped
IntFunction.
-
intFunction
@CheckReturnValue public static <KEY,OUTPUT> IntFunction<OUTPUT> intFunction(IntFunction<OUTPUT> function, IntFunction<KEY> keyFunction) Memoizes a
IntFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output/cache value.- Parameters:
function- TheIntFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntFunction.
-
intFunction
@CheckReturnValue public static <OUTPUT> IntFunction<OUTPUT> intFunction(IntFunction<OUTPUT> function, Map<Integer, OUTPUT> cache) Memoizes a
IntFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output/cache value.- Parameters:
function- TheIntFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntFunction.
-
intFunction
@CheckReturnValue public static <KEY,OUTPUT> IntFunction<OUTPUT> intFunction(IntFunction<OUTPUT> function, IntFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes a
IntFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output/cache value.- Parameters:
function- TheIntFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntFunction.
-
intPredicate
Memoizes a
IntPredicatein aConcurrentMap.- Default cache
- Default cache key
- Parameters:
predicate- TheIntPredicateto memoize.- Returns:
- The wrapped
IntPredicate.
-
intPredicate
@CheckReturnValue public static <KEY> IntPredicate intPredicate(IntPredicate predicate, IntFunction<KEY> keyFunction) Memoizes a
IntPredicatein aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheIntPredicateto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntPredicate.
-
intPredicate
@CheckReturnValue public static <KEY> IntPredicate intPredicate(IntPredicate predicate, IntFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes a
IntPredicatein aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheIntPredicateto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntPredicate.
-
intPredicate
@CheckReturnValue public static IntPredicate intPredicate(IntPredicate predicate, Map<Integer, Boolean> cache) Memoizes a
IntPredicatein aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
predicate- TheIntPredicateto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntPredicate.
-
intSupplier
Memoizes a
IntSupplierin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
supplier- TheSupplierto memoize.- Returns:
- The wrapped
IntSupplier.
-
intSupplier
@CheckReturnValue public static IntSupplier intSupplier(IntSupplier supplier, Map<Integer, Integer> cache) Memoizes a
IntSupplierin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
supplier- TheIntSupplierto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntSupplier.
-
intSupplier
@CheckReturnValue public static <KEY> IntSupplier intSupplier(IntSupplier supplier, Supplier<KEY> keySupplier) Memoizes a
IntSupplierin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheIntSupplierto memoize.keySupplier- TheSupplierfor the cache key.- Returns:
- The wrapped
IntSupplier.
-
intSupplier
@CheckReturnValue public static <KEY> IntSupplier intSupplier(IntSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Integer> cache) Memoizes a
IntSupplierin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheIntSupplierto memoize.keySupplier- TheSupplierfor the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntSupplier.
-
intToDoubleFunction
@CheckReturnValue public static IntToDoubleFunction intToDoubleFunction(IntToDoubleFunction function) Memoizes a
IntToDoubleFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheIntToDoubleFunctionto memoize.- Returns:
- The wrapped
IntToDoubleFunction.
-
intToDoubleFunction
@CheckReturnValue public static <KEY> IntToDoubleFunction intToDoubleFunction(IntToDoubleFunction function, IntFunction<KEY> keyFunction) Memoizes a
IntToDoubleFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheIntToDoubleFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntToDoubleFunction.
-
intToDoubleFunction
@CheckReturnValue public static <KEY> IntToDoubleFunction intToDoubleFunction(IntToDoubleFunction function, IntFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
IntToDoubleFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheIntToDoubleFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntToDoubleFunction.
-
intToDoubleFunction
@CheckReturnValue public static IntToDoubleFunction intToDoubleFunction(IntToDoubleFunction function, Map<Integer, Double> cache) Memoizes a
IntToDoubleFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheIntToDoubleFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntToDoubleFunction.
-
intToLongFunction
Memoizes a
IntToLongFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheIntToLongFunctionto memoize.- Returns:
- The wrapped
IntToLongFunction.
-
intToLongFunction
@CheckReturnValue public static <KEY> IntToLongFunction intToLongFunction(IntToLongFunction function, IntFunction<KEY> keyFunction) Memoizes a
IntToLongFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheIntToLongFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntToLongFunction.
-
intToLongFunction
@CheckReturnValue public static <KEY> IntToLongFunction intToLongFunction(IntToLongFunction function, IntFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
IntToLongFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheIntToLongFunctionto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntToLongFunction.
-
intToLongFunction
@CheckReturnValue public static IntToLongFunction intToLongFunction(IntToLongFunction function, Map<Integer, Long> cache) Memoizes a
IntToLongFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheIntToLongFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntToLongFunction.
-
intUnaryOperator
Memoizes a
IntUnaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheIntUnaryOperatorto memoize.- Returns:
- The wrapped
IntUnaryOperator.
-
intUnaryOperator
@CheckReturnValue public static <KEY> IntUnaryOperator intUnaryOperator(IntUnaryOperator operator, IntFunction<KEY> keyFunction) Memoizes a
IntUnaryOperatorin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheIntUnaryOperatorto memoize.keyFunction- TheIntFunctionto compute the cache key.- Returns:
- The wrapped
IntUnaryOperator.
-
intUnaryOperator
@CheckReturnValue public static <KEY> IntUnaryOperator intUnaryOperator(IntUnaryOperator operator, IntFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
IntUnaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheIntUnaryOperatorto memoize.keyFunction- TheIntFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntUnaryOperator.
-
intUnaryOperator
@CheckReturnValue public static IntUnaryOperator intUnaryOperator(IntUnaryOperator operator, Map<Integer, Integer> cache) Memoizes a
IntUnaryOperatorin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
operator- TheIntUnaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
IntUnaryOperator.
-
longBinaryOperator
Memoizes a
LongBinaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheLongBinaryOperatorto memoize.- Returns:
- The wrapped
LongBinaryOperator.
-
longBinaryOperator
@CheckReturnValue public static <KEY> LongBinaryOperator longBinaryOperator(LongBinaryOperator operator, LongBinaryFunction<KEY> keyFunction) Memoizes a
LongBinaryOperatorin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheLongBinaryOperatorto memoize.keyFunction- TheLongBinaryFunctionto compute the cache key.- Returns:
- The wrapped
LongBinaryOperator.
-
longBinaryOperator
@CheckReturnValue public static <KEY> LongBinaryOperator longBinaryOperator(LongBinaryOperator operator, LongBinaryFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
LongBinaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheLongBinaryOperatorto memoize.keyFunction- TheLongBinaryFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongBinaryOperator.
-
longBinaryOperator
@CheckReturnValue public static LongBinaryOperator longBinaryOperator(LongBinaryOperator operator, Map<Integer, Long> cache) Memoizes a
LongBinaryOperatorin aConcurrentMap.- Default cache
- Custom cache key
- Parameters:
operator- TheLongBinaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongBinaryOperator.
-
longConsumer
Memoizes a
LongConsumerin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
consumer- TheLongConsumerto memoize.- Returns:
- The wrapped
LongConsumer.
-
longConsumer
@CheckReturnValue public static <KEY> LongConsumer longConsumer(LongConsumer consumer, LongFunction<KEY> keyFunction) Memoizes a
LongConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheLongConsumerto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongConsumer.
-
longConsumer
@CheckReturnValue public static LongConsumer longConsumer(LongConsumer consumer, Map<Long, Long> cache) Memoizes a
LongConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
consumer- TheLongConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongConsumer.
-
longConsumer
@CheckReturnValue public static <KEY> LongConsumer longConsumer(LongConsumer consumer, LongFunction<KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
LongConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
consumer- TheLongConsumerto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongConsumer.
-
longFunction
@CheckReturnValue public static <OUTPUT> LongFunction<OUTPUT> longFunction(LongFunction<OUTPUT> function) Memoizes a
LongFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output/cache value.- Parameters:
function- TheLongFunctionto memoize.- Returns:
- The wrapped
LongFunction.
-
longFunction
@CheckReturnValue public static <KEY,OUTPUT> LongFunction<OUTPUT> longFunction(LongFunction<OUTPUT> function, LongFunction<KEY> keyFunction) Memoizes a
LongFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output/cache value.- Parameters:
function- TheLongFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongFunction.
-
longFunction
@CheckReturnValue public static <KEY,OUTPUT> LongFunction<OUTPUT> longFunction(LongFunction<OUTPUT> function, LongFunction<KEY> keyFunction, Map<KEY, OUTPUT> cache) Memoizes a
LongFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.OUTPUT- The type of the output/cache value.- Parameters:
function- TheLongFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongFunction.
-
longFunction
@CheckReturnValue public static <OUTPUT> LongFunction<OUTPUT> longFunction(LongFunction<OUTPUT> function, Map<Long, OUTPUT> cache) Memoizes a
LongFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
OUTPUT- The type of the output/cache value.- Parameters:
function- TheLongFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongFunction.
-
longPredicate
Memoizes a
LongPredicatein aConcurrentMap.- Default cache
- Default cache key
- Parameters:
predicate- TheLongPredicateto memoize.- Returns:
- The wrapped
DoublePredicate.
-
longPredicate
@CheckReturnValue public static <KEY> LongPredicate longPredicate(LongPredicate predicate, LongFunction<KEY> keyFunction) Memoizes a
LongPredicatein aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheLongPredicateto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongPredicate.
-
longPredicate
@CheckReturnValue public static <KEY> LongPredicate longPredicate(LongPredicate predicate, LongFunction<KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes a
LongPredicatein aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
predicate- TheLongPredicateto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongPredicate.
-
longPredicate
@CheckReturnValue public static LongPredicate longPredicate(LongPredicate predicate, Map<Long, Boolean> cache) Memoizes a
LongPredicatein aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
predicate- TheLongPredicateto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongPredicate.
-
longSupplier
Memoizes a
LongSupplierin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
supplier- TheSupplierto memoize.- Returns:
- The wrapped
LongSupplier.
-
longSupplier
@CheckReturnValue public static LongSupplier longSupplier(LongSupplier supplier, Map<Integer, Long> cache) Memoizes a
LongSupplierin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
supplier- TheLongSupplierto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongSupplier.
-
longSupplier
@CheckReturnValue public static <KEY> LongSupplier longSupplier(LongSupplier supplier, Supplier<KEY> keySupplier) Memoizes a
LongSupplierin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheLongSupplierto memoize.keySupplier- TheSupplierfor the cache key.- Returns:
- The wrapped
LongSupplier.
-
longSupplier
@CheckReturnValue public static <KEY> LongSupplier longSupplier(LongSupplier supplier, Supplier<KEY> keySupplier, Map<KEY, Long> cache) Memoizes a
LongSupplierin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
supplier- TheLongSupplierto memoize.keySupplier- TheSupplierfor the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongSupplier.
-
longToDoubleFunction
@CheckReturnValue public static LongToDoubleFunction longToDoubleFunction(LongToDoubleFunction function) Memoizes a
LongToDoubleFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheLongToDoubleFunctionto memoize.- Returns:
- The wrapped
LongToDoubleFunction.
-
longToDoubleFunction
@CheckReturnValue public static <KEY> LongToDoubleFunction longToDoubleFunction(LongToDoubleFunction function, LongFunction<KEY> keyFunction) Memoizes a
LongToDoubleFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheLongToDoubleFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongToDoubleFunction.
-
longToDoubleFunction
@CheckReturnValue public static <KEY> LongToDoubleFunction longToDoubleFunction(LongToDoubleFunction function, LongFunction<KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
LongToDoubleFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheLongToDoubleFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongToDoubleFunction.
-
longToDoubleFunction
@CheckReturnValue public static LongToDoubleFunction longToDoubleFunction(LongToDoubleFunction function, Map<Long, Double> cache) Memoizes a
LongToDoubleFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheLongToDoubleFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongToDoubleFunction.
-
longToIntFunction
Memoizes a
LongToIntFunctionin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
function- TheLongToIntFunctionto memoize.- Returns:
- The wrapped
LongToIntFunction.
-
longToIntFunction
@CheckReturnValue public static <KEY> LongToIntFunction longToIntFunction(LongToIntFunction function, LongFunction<KEY> keyFunction) Memoizes a
LongToIntFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheLongToIntFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongToIntFunction.
-
longToIntFunction
@CheckReturnValue public static <KEY> LongToIntFunction longToIntFunction(LongToIntFunction function, LongFunction<KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
LongToIntFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
function- TheLongToIntFunctionto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongToIntFunction.
-
longToIntFunction
@CheckReturnValue public static LongToIntFunction longToIntFunction(LongToIntFunction function, Map<Long, Integer> cache) Memoizes a
LongToIntFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
function- TheLongToIntFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongToIntFunction.
-
longUnaryOperator
Memoizes a
LongUnaryOperatorin aConcurrentMap.- Default cache
- Default cache key
- Parameters:
operator- TheLongUnaryOperatorto memoize.- Returns:
- The wrapped
LongUnaryOperator.
-
longUnaryOperator
@CheckReturnValue public static <KEY> LongUnaryOperator longUnaryOperator(LongUnaryOperator operator, LongFunction<KEY> keyFunction) Memoizes a
LongUnaryOperatorin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheLongUnaryOperatorto memoize.keyFunction- TheLongFunctionto compute the cache key.- Returns:
- The wrapped
LongUnaryOperator.
-
longUnaryOperator
@CheckReturnValue public static <KEY> LongUnaryOperator longUnaryOperator(LongUnaryOperator operator, LongFunction<KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
LongUnaryOperatorin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
KEY- The type of the cache key.- Parameters:
operator- TheLongUnaryOperatorto memoize.keyFunction- TheLongFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongUnaryOperator.
-
longUnaryOperator
@CheckReturnValue public static LongUnaryOperator longUnaryOperator(LongUnaryOperator operator, Map<Long, Long> cache) Memoizes a
LongUnaryOperatorin aConcurrentMap.- Custom cache
- Default cache key
- Parameters:
operator- TheLongUnaryOperatorto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
LongUnaryOperator.
-
objDoubleConsumer
@CheckReturnValue public static <INPUT> ObjDoubleConsumer<INPUT> objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer) Memoizes a
ObjDoubleConsumerin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjDoubleConsumerto memoize.- Returns:
- The wrapped
ObjDoubleConsumer.
-
objDoubleConsumer
@CheckReturnValue public static <INPUT> ObjDoubleConsumer<INPUT> objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes a
ObjDoubleConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjDoubleConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjDoubleConsumer.
-
objDoubleConsumer
@CheckReturnValue public static <KEY,INPUT> ObjDoubleConsumer<INPUT> objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, ObjDoubleFunction<INPUT, KEY> keyFunction) Memoizes a
ObjDoubleConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjDoubleConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ObjDoubleConsumer.
-
objDoubleConsumer
@CheckReturnValue public static <KEY,INPUT> ObjDoubleConsumer<INPUT> objDoubleConsumer(ObjDoubleConsumer<INPUT> consumer, ObjDoubleFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
ObjDoubleConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjDoubleConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjDoubleConsumer.
-
objIntConsumer
@CheckReturnValue public static <INPUT> ObjIntConsumer<INPUT> objIntConsumer(ObjIntConsumer<INPUT> consumer) Memoizes a
ObjIntConsumerin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjIntConsumerto memoize.- Returns:
- The wrapped
ObjIntConsumer.
-
objIntConsumer
@CheckReturnValue public static <INPUT> ObjIntConsumer<INPUT> objIntConsumer(ObjIntConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes a
ObjIntConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjIntConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjIntConsumer.
-
objIntConsumer
@CheckReturnValue public static <KEY,INPUT> ObjIntConsumer<INPUT> objIntConsumer(ObjIntConsumer<INPUT> consumer, ObjIntFunction<INPUT, KEY> keyFunction) Memoizes a
ObjIntConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjIntConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ObjIntConsumer.
-
objIntConsumer
@CheckReturnValue public static <KEY,INPUT> ObjIntConsumer<INPUT> objIntConsumer(ObjIntConsumer<INPUT> consumer, ObjIntFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
ObjIntConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjIntConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjIntConsumer.
-
objLongConsumer
@CheckReturnValue public static <INPUT> ObjLongConsumer<INPUT> objLongConsumer(ObjLongConsumer<INPUT> consumer) Memoizes a
ObjLongConsumerin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjLongConsumerto memoize.- Returns:
- The wrapped
ObjLongConsumer.
-
objLongConsumer
@CheckReturnValue public static <INPUT> ObjLongConsumer<INPUT> objLongConsumer(ObjLongConsumer<INPUT> consumer, Map<Integer, Integer> cache) Memoizes a
ObjLongConsumerin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
consumer- TheObjLongConsumerto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjLongConsumer.
-
objLongConsumer
@CheckReturnValue public static <KEY,INPUT> ObjLongConsumer<INPUT> objLongConsumer(ObjLongConsumer<INPUT> consumer, ObjLongFunction<INPUT, KEY> keyFunction) Memoizes a
ObjLongConsumerin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjLongConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ObjLongConsumer.
-
objLongConsumer
@CheckReturnValue public static <KEY,INPUT> ObjLongConsumer<INPUT> objLongConsumer(ObjLongConsumer<INPUT> consumer, ObjLongFunction<INPUT, KEY> keyFunction, Map<KEY, KEY> cache) Memoizes a
ObjLongConsumerin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
consumer- TheObjLongConsumerto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ObjLongConsumer.
-
predicate
Memoizes a
Predicatein aConcurrentMap.- Default cache
- Default cache key
-
predicate
@CheckReturnValue public static <KEY,INPUT> Predicate<INPUT> predicate(Predicate<INPUT> predicate, Function<INPUT, KEY> keyFunction) Memoizes a
Predicatein aConcurrentMap.- Default cache
- Custom cache key
-
predicate
@CheckReturnValue public static <KEY,INPUT> Predicate<INPUT> predicate(Predicate<INPUT> predicate, Function<INPUT, KEY> keyFunction, Map<KEY, Boolean> cache) Memoizes a
Predicatein aConcurrentMap.- Custom cache
- Custom cache key
-
predicate
@CheckReturnValue public static <INPUT> Predicate<INPUT> predicate(Predicate<INPUT> predicate, Map<INPUT, Boolean> cache) Memoizes a
Predicatein aConcurrentMap.- Custom cache
- Default cache key
-
supplier
Memoizes a
Supplierin aConcurrentMap.- Default cache
- Default cache key
-
supplier
@CheckReturnValue public static <OUTPUT> Supplier<OUTPUT> supplier(Supplier<OUTPUT> supplier, Map<Integer, OUTPUT> cache) Memoizes a
Supplierin aConcurrentMap.- Custom cache
- Default cache key
-
supplier
@CheckReturnValue public static <KEY,OUTPUT> Supplier<OUTPUT> supplier(Supplier<OUTPUT> supplier, Supplier<KEY> keySupplier) Memoizes a
Supplierin aConcurrentMap.- Default cache
- Custom cache key
-
supplier
@CheckReturnValue public static <KEY,OUTPUT> Supplier<OUTPUT> supplier(Supplier<OUTPUT> supplier, Supplier<KEY> keySupplier, Map<KEY, OUTPUT> cache) Memoizes a
Supplierin aConcurrentMap.- Custom cache key
- Custom cache
-
toDoubleBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function) Memoizes a
ToDoubleBiFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToDoubleBiFunctionto memoize.- Returns:
- The wrapped
ToDoubleBiFunction.
-
toDoubleBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToDoubleBiFunction<FIRST,KEY> SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
ToDoubleBiFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToDoubleBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ToDoubleBiFunction.
-
toDoubleBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToDoubleBiFunction<FIRST,KEY> SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
ToDoubleBiFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToDoubleBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToDoubleBiFunction.
-
toDoubleBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToDoubleBiFunction<FIRST,SECOND> toDoubleBiFunction(ToDoubleBiFunction<FIRST, SECOND> function, Map<Integer, Double> cache) Memoizes a
ToDoubleBiFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToDoubleBiFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToDoubleBiFunction.
-
toDoubleFunction
@CheckReturnValue public static <INPUT> ToDoubleFunction<INPUT> toDoubleFunction(ToDoubleFunction<INPUT> function) Memoizes a
ToDoubleFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToDoubleFunctionto memoize.- Returns:
- The wrapped
ToDoubleFunction.
-
toDoubleFunction
@CheckReturnValue public static <KEY,INPUT> ToDoubleFunction<INPUT> toDoubleFunction(ToDoubleFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes a
ToDoubleFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToDoubleFunctionto memoize.keyFunction- TheFunctionto compute the cache key.- Returns:
- The wrapped
ToDoubleFunction.
-
toDoubleFunction
@CheckReturnValue public static <KEY,INPUT> ToDoubleFunction<INPUT> toDoubleFunction(ToDoubleFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Double> cache) Memoizes a
ToDoubleFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToDoubleFunctionto memoize.keyFunction- TheFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToDoubleFunction.
-
toDoubleFunction
@CheckReturnValue public static <INPUT> ToDoubleFunction<INPUT> toDoubleFunction(ToDoubleFunction<INPUT> function, Map<INPUT, Double> cache) Memoizes a
ToDoubleFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToDoubleFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToDoubleFunction.
-
toIntBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function) Memoizes a
ToIntBiFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToIntBiFunctionto memoize.- Returns:
- The wrapped
ToIntBiFunction.
-
toIntBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToIntBiFunction<FIRST,KEY> SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
ToIntBiFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToIntBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ToIntBiFunction.
-
toIntBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToIntBiFunction<FIRST,KEY> SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
ToIntBiFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToIntBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.cache-Mapof already computed values.- Returns:
- The wrapped
ToIntBiFunction.
-
toIntBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToIntBiFunction<FIRST,SECOND> toIntBiFunction(ToIntBiFunction<FIRST, SECOND> function, Map<Integer, Integer> cache) Memoizes a
ToIntBiFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToIntBiFunctionto memoize.cache-Mapof already computed values.- Returns:
- The wrapped
ToIntBiFunction.
-
toIntFunction
@CheckReturnValue public static <KEY,INPUT> ToIntFunction<INPUT> toIntFunction(ToIntFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes a
ToIntFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToIntFunctionto memoize.keyFunction- TheFunctionto compute the cache key.- Returns:
- The wrapped
ToIntFunction.
-
toIntFunction
@CheckReturnValue public static <KEY,INPUT> ToIntFunction<INPUT> toIntFunction(ToIntFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Integer> cache) Memoizes a
ToIntFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToIntFunctionto memoize.keyFunction- TheFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToIntFunction.
-
toIntFunction
@CheckReturnValue public static <INPUT> ToIntFunction<INPUT> toIntFunction(ToIntFunction<INPUT> function, Map<INPUT, Integer> cache) Memoizes a
ToIntFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToIntFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToIntFunction.
-
toIntFunction
@CheckReturnValue public static <INPUT> ToIntFunction<INPUT> toIntFunction(ToIntFunction<INPUT> function) Memoizes a
ToIntFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToIntFunctionto memoize.- Returns:
- The wrapped
ToIntFunction.
-
toLongBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function) Memoizes a
ToLongBiFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToLongBiFunctionto memoize.- Returns:
- The wrapped
ToLongBiFunction.
-
toLongBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToLongBiFunction<FIRST,KEY> SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction) Memoizes a
ToLongBiFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToLongBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.- Returns:
- The wrapped
ToLongBiFunction.
-
toLongBiFunction
@CheckReturnValue public static <FIRST,SECOND, ToLongBiFunction<FIRST,KEY> SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, BiFunction<FIRST, SECOND, KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
ToLongBiFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.KEY- The type of the cache key.- Parameters:
function- TheToLongBiFunctionto memoize.keyFunction- TheBiFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToLongBiFunction.
-
toLongBiFunction
@CheckReturnValue public static <FIRST,SECOND> ToLongBiFunction<FIRST,SECOND> toLongBiFunction(ToLongBiFunction<FIRST, SECOND> function, Map<Integer, Long> cache) Memoizes a
ToLongBiFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
FIRST- The type of the first parameter.SECOND- The type of the second parameter.- Parameters:
function- TheToLongBiFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToLongBiFunction.
-
toLongFunction
@CheckReturnValue public static <KEY,INPUT> ToLongFunction<INPUT> toLongFunction(ToLongFunction<INPUT> function, Function<INPUT, KEY> keyFunction) Memoizes a
ToLongFunctionin aConcurrentMap.- Default cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToLongFunctionto memoize.keyFunction- TheFunctionto compute the cache key.- Returns:
- The wrapped
ToLongFunction.
-
toLongFunction
@CheckReturnValue public static <KEY,INPUT> ToLongFunction<INPUT> toLongFunction(ToLongFunction<INPUT> function, Function<INPUT, KEY> keyFunction, Map<KEY, Long> cache) Memoizes a
ToLongFunctionin aConcurrentMap.- Custom cache
- Custom cache key
- Type Parameters:
INPUT- The type of the input.KEY- The type of the cache key.- Parameters:
function- TheToLongFunctionto memoize.keyFunction- TheFunctionto compute the cache key.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToLongFunction.
-
toLongFunction
@CheckReturnValue public static <INPUT> ToLongFunction<INPUT> toLongFunction(ToLongFunction<INPUT> function, Map<INPUT, Long> cache) Memoizes a
ToLongFunctionin aConcurrentMap.- Custom cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToLongFunctionto memoize.cache- TheMapbased cache to use.- Returns:
- The wrapped
ToLongFunction.
-
toLongFunction
@CheckReturnValue public static <INPUT> ToLongFunction<INPUT> toLongFunction(ToLongFunction<INPUT> function) Memoizes a
ToLongFunctionin aConcurrentMap.- Default cache
- Default cache key
- Type Parameters:
INPUT- The type of the input.- Parameters:
function- TheToLongFunctionto memoize.- Returns:
- The wrapped
ToLongFunction.
-