Class Memoizer<T,​R>


  • @ThreadSafe
    public class Memoizer<T,​R>
    extends Object
    This class can be used to create functions that calculate results only once.

    The lifetime of the results is the lifetime of the function.

    Since:
    5.8
    • Method Detail

      • memoize

        public static <T,​R> Function<T,​R> memoize​(Function<T,​R> function)
      • memoize

        public static <T,​U,​R> BiFunction<T,​U,​R> memoize​(BiFunction<T,​U,​R> function)