Class UncheckSupplier

java.lang.Object
io.hotmoka.exceptions.UncheckSupplier

public abstract class UncheckSupplier extends Object
This class provides a method to transform a supplier with exceptions into a supplier, by unchecking its exceptions.
  • Method Details

    • uncheck

      public static <T> Supplier<T> uncheck(SupplierWithExceptions<? extends T> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      Parameters:
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E extends Throwable> Supplier<T> uncheck(Class<E> exception, SupplierWithExceptions1<? extends T,E> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E - the type of exceptions that get unchecked
      Parameters:
      exception - the exception tag of E
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, SupplierWithExceptions2<? extends T,E1,E2> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, SupplierWithExceptions3<? extends T,E1,E2,E3> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      E3 - the third type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      exception3 - the exception tag of E3
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, SupplierWithExceptions4<? extends T,E1,E2,E3,E4> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      E3 - the third type of exceptions that get unchecked
      E4 - the fourth type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      exception3 - the exception tag of E3
      exception4 - the exception tag of E4
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, SupplierWithExceptions5<? extends T,E1,E2,E3,E4,E5> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      E3 - the third type of exceptions that get unchecked
      E4 - the fourth type of exceptions that get unchecked
      E5 - the fifth type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      exception3 - the exception tag of E3
      exception4 - the exception tag of E4
      exception5 - the exception tag of E5
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, SupplierWithExceptions6<? extends T,E1,E2,E3,E4,E5,E6> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      E3 - the third type of exceptions that get unchecked
      E4 - the fourth type of exceptions that get unchecked
      E5 - the fifth type of exceptions that get unchecked
      E6 - the sixth type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      exception3 - the exception tag of E3
      exception4 - the exception tag of E4
      exception5 - the exception tag of E5
      exception6 - the exception tag of E6
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions
    • uncheck

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable> Supplier<T> uncheck(Class<E1> exception1, Class<E2> exception2, Class<E3> exception3, Class<E4> exception4, Class<E5> exception5, Class<E6> exception6, Class<E7> exception7, SupplierWithExceptions7<? extends T,E1,E2,E3,E4,E5,E6,E7> wrapped)
      Transforms a supplier with exceptions into a supplier without checked exceptions. This means that all checked exceptions get wrapped into a UncheckedException. They can later be recovered through a method from CheckRunnable or CheckSupplier.
      Type Parameters:
      T - the type of the supplied value
      E1 - the first type of exceptions that get unchecked
      E2 - the second type of exceptions that get unchecked
      E3 - the third type of exceptions that get unchecked
      E4 - the fourth type of exceptions that get unchecked
      E5 - the fifth type of exceptions that get unchecked
      E6 - the sixth type of exceptions that get unchecked
      E7 - the seventh type of exceptions that get unchecked
      Parameters:
      exception1 - the exception tag of E1
      exception2 - the exception tag of E2
      exception3 - the exception tag of E3
      exception4 - the exception tag of E4
      exception5 - the exception tag of E5
      exception6 - the exception tag of E6
      exception7 - the exception tag of E7
      wrapped - the supplier with exceptions
      Returns:
      the supplier without exceptions