Class Functions0


  • public final class Functions0
    extends Object
    • Method Detail

      • throwing

        public static <T> Function0<T> throwing​(ThrowingFunction0<T> throwingFunction0)
        Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function that will throw a RuntimeException, wrapping the checked exception that is the cause.
      • throwing

        public static <T> Function0<T> throwing​(ThrowingFunction0<T> throwingFunction0,
                                                Function<? super Throwable,​? extends RuntimeException> rethrow)
        Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function0 that will throw a user specified RuntimeException based on the provided function. The function is passed the current element and the checked exception that was thrown as context arguments.
      • nullValue

        public static <T> Function0<T> nullValue()
      • value

        public static <T> Function0<T> value​(T t)