Class Underscore.MemoizeFunction<F,​T>

  • All Implemented Interfaces:
    java.util.function.Function<F,​T>
    Enclosing class:
    Underscore<T>

    public abstract static class Underscore.MemoizeFunction<F,​T>
    extends java.lang.Object
    implements java.util.function.Function<F,​T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<F,​T> cache  
    • Constructor Summary

      Constructors 
      Constructor Description
      MemoizeFunction()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T apply​(F key)  
      abstract T calc​(F n)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Field Detail

      • cache

        private final java.util.Map<F,​T> cache
    • Constructor Detail

      • MemoizeFunction

        public MemoizeFunction()
    • Method Detail

      • calc

        public abstract T calc​(F n)
      • apply

        public T apply​(F key)
        Specified by:
        apply in interface java.util.function.Function<F,​T>