memoization-core/src/main/java/de/xn__ho_hia/memoization/map/MapMemoize.java
public static <KEY> DoubleToIntFunction doubleToIntFunction(
            final DoubleToIntFunction function,
            final DoubleFunction<KEY> keyFunction,
            final Map<KEY, Integer> cache) {
        return new ConcurrentMapBasedDoubleToIntFunctionMemoizer<>(asConcurrentMap(cache), keyFunction, function);
    }
/**
     * <p>
     * Memoizes a {@link DoubleToIntFunction} in a {@link java.util.concurrent.ConcurrentMap}.
     * </p>
     * <h3>Features</h3>
     * <ul>
     * <li>Custom cache</li>
     * <li>Custom cache key</li>
     * </ul>
     *
     * @param <KEY>
     *            The type of the cache key.
     * @param function
     *            The {@link DoubleToIntFunction} to memoize.
     * @param keyFunction
     *            The {@link DoubleFunction} to compute the cache key.
     * @param cache
     *            The {@link Map} based cache to use.
     * @return The wrapped {@link DoubleToIntFunction}.
     */


@param 
The type of the cache key.
@param function
The  DoubleToIntFunction to memoize.
@param keyFunction
The  DoubleFunction to compute the cache key.
@param cache
The  Map based cache to use.
@return The wrapped  DoubleToIntFunction.
@param The type of the cache key . @param function The DoubleToIntFunction to memoize . @param keyFunction The DoubleFunction to compute the cache key . @param cache The Map based cache to use . @return The wrapped DoubleToIntFunction .
public static <KEY> DoubleToIntFunction doubleToIntFunction(
            final DoubleToIntFunction function,
            final DoubleFunction<KEY> keyFunction,
            final Map<KEY, Integer> cache) {
        return new ConcurrentMapBasedDoubleToIntFunctionMemoizer<>(asConcurrentMap(cache), keyFunction, function);
    }
public static < KEY > DoubleToIntFunction doubleToIntFunction ( final DoubleToIntFunction function , final DoubleFunction < KEY > keyFunction , final Map < KEY , Integer > cache ) { return new ConcurrentMapBasedDoubleToIntFunctionMemoizer < > ( asConcurrentMap ( cache ) , keyFunction , function ) ; }
<p>
 Memoizes a {@link DoubleToIntFunction} in a {@link java.util.concurrent.ConcurrentMap}.
<p > Memoizes a { @link DoubleToIntFunction } in a { @link java . util . concurrent . ConcurrentMap } .