类 Functions


  • public class Functions
    extends java.lang.Object
    Utils for Function
    • 构造器概要

      构造器 
      构造器 说明
      Functions()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static <T,​R>
      java.util.function.Function<T,​R>
      memoize​(java.util.function.Function<T,​R> function)
      Return a thread-safe Function which only calculate once for each key.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • Functions

        public Functions()
    • 方法详细资料

      • memoize

        public static <T,​R> java.util.function.Function<T,​R> memoize​(java.util.function.Function<T,​R> function)
        Return a thread-safe Function which only calculate once for each key.

        The passed in function should not return null value, or throw exception. If error occurred when compute value, the exception would be thrown, and the next call will run the code again. If computed value is null, a NPE would be thrown.