T - the type of the input to the functionR - the type of the result of the functionE - the type of exception that may be thrown from the functionpublic interface ThrowingFunction<T,R,E extends Exception>
| Modifier and Type | Method and Description |
|---|---|
R |
apply(T t)
Apply a value to this function
|
static <T,R,E extends Exception> |
catchThrown(Class<E> clazz,
ThrowingFunction<T,R,E> throwing)
Construct a regular function that calls a throwing function and catches all checked exceptions
declared and thrown by the throwing function and rethrows them as
UncaughtCheckedException
for handling further up the stack. |
static <E extends Exception> |
throwIfPresent(Optional<E> exception) |
static <T,R,E extends Exception> Function<T,R> catchThrown(Class<E> clazz, ThrowingFunction<T,R,E> throwing)
UncaughtCheckedException
for handling further up the stack.T - type of argumentsR - type of resultsE - type of checked exceptions thrown by the throwing functionthrowing - the throwing function to wtapIllegalStateException - if an unexpected exception is caught (ie. neither of type E or a runtime exception)UncaughtCheckedExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.