Class DefaultMemoizingBiFunction<T,U,R>

java.lang.Object
io.fluxcapacitor.common.DefaultMemoizingBiFunction<T,U,R>
Type Parameters:
T - the type of the first input argument
U - the type of the second input argument
R - the type of the computed result
All Implemented Interfaces:
MemoizingBiFunction<T,U,R>, BiFunction<T,U,R>

public class DefaultMemoizingBiFunction<T,U,R> extends Object implements MemoizingBiFunction<T,U,R>
A default implementation of the MemoizingBiFunction interface that memoizes (caches) results of a BiFunction based on a pair of input arguments. Cached results can be reused for identical subsequent calls, and the cache can optionally be configured with a lifespan and a custom clock for time-based eviction. This class internally uses a MemoizingFunction, with the input arguments wrapped as Map.Entry for caching purposes.