| Modifier and Type | Class and Description |
|---|---|
static interface |
Checked.Function<A,B,E extends Exception>
Represents a
Checked.Function that may throw an exception. |
static interface |
Checked.Supplier<A,E extends Exception>
Represents a
Checked.Supplier that may throw an exception. |
| Modifier and Type | Method and Description |
|---|---|
static <A,B,E extends Exception> |
lift(Checked.Function<A,B,E> f)
Lifts a function that potentially throws into a function that either
returns a Success of the value or a failure containing the thrown
exception.
|
static <A,E extends Exception> |
of(Checked.Supplier<A,E> s)
Create a new Try representing the result of a potentially exception
throwing operation.
|
public static <A,B,E extends Exception> Function<A,Try<B>> lift(Checked.Function<A,B,E> f)
A - the function argument typeB - the function return typeE - The type of exception potentially thrownf - a function that can throwpublic static <A,E extends Exception> Try<A> of(Checked.Supplier<A,E> s)
A - the type of value s suppliesE - The type of exception potentially throwns - a supplier that may throw an exceptionCopyright © 2017 Atlassian. All rights reserved.