Class ValueFunction<T,​R>

    • Constructor Detail

      • ValueFunction

        public ValueFunction​(R result)
    • Method Detail

      • voidFunction

        public static <T> ValueFunction<T,​Void> voidFunction()
        Returns a function that always returns a null result, regardless of input.
        Type Parameters:
        T - the function parameter type
        Returns:
        a function that always returns null
      • apply

        public R apply​(T ignored)
        Specified by:
        apply in interface Function<T,​R>