Package dev.kylesilver.result
Interface CheckedSupplier<T,E extends Throwable>
- Type Parameters:
T
- The type of the value yielded by the functionE
- The type of an exception thrown by the function. Since there is no mechanism in theResult
class for catching multiple exception types,<E>
must be a parent type to all exceptions that the function might throw. If this condition is not met, aErrorTypeMismatchException
will be thrown at runtime.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Similar to the
Supplier
interface, but with
additional type information to allow for the function to throw an exception.-
Method Summary