Class FunctionExceptionHandler


  • public class FunctionExceptionHandler
    extends java.lang.Object
    Utility class to handle checked exceptions in lambdas.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <R> java.util.function.Supplier<R> supplier​(ThrowableSupplier<R> supplier)
      Converts a ThrowableSupplier to a Supplier than can throw exceptions by converting them to unchecked exceptions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • supplier

        public static <R> java.util.function.Supplier<R> supplier​(ThrowableSupplier<R> supplier)
        Converts a ThrowableSupplier to a Supplier than can throw exceptions by converting them to unchecked exceptions.
        Parameters:
        supplier - A ThrowableSupplier than can throw any exception
        Returns:
        a Supplier of results.