public interface Try<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Try.Failure<T> |
static class |
Try.Success<T> |
static interface |
Try.TrowableSupplier<T> |
static interface |
Try.TryableConsumer<T> |
static interface |
Try.TryableExpression |
static interface |
Try.TryableFunction<T,R> |
static interface |
Try.TryableSupplier<T> |
static class |
Try.TryWithResources<T extends java.lang.AutoCloseable> |
| Modifier and Type | Method and Description |
|---|---|
void |
apply() |
Try<T> |
apply(Try.TryableConsumer<T> consumes) |
Try<T> |
error(java.util.function.Function<? super java.lang.Throwable,? extends java.lang.Throwable> mapper) |
static <T> Try<T> |
failure(java.lang.Throwable throwable) |
<U> Try<U> |
flatMap(java.util.function.Function<T,Try<? extends U>> mapper) |
T |
get() |
<U> Try<U> |
map(Try.TryableFunction<T,? extends U> mapper) |
static <T> Try<T> |
of(Try.TryableSupplier<? extends T> supplier) |
T |
or(java.util.function.Supplier<T> mapper) |
<E extends java.lang.Throwable> |
recover(java.lang.Class<E> type,
java.util.function.Function<E,Try<? extends T>> mapper) |
Try<T> |
recover(java.util.function.Function<? super java.lang.Throwable,Try<? extends T>> mapper) |
static Try<java.lang.Void> |
run(Try.TryableExpression expression) |
static void |
silently(Try.TryableExpression... expressions) |
static <T> Try<T> |
success(T value) |
static <T extends java.lang.AutoCloseable> |
withResources(Try.TryableSupplier<? extends T> supplier) |
static <T> Try<T> of(Try.TryableSupplier<? extends T> supplier)
static Try<java.lang.Void> run(Try.TryableExpression expression)
static <T extends java.lang.AutoCloseable> Try.TryWithResources<T> withResources(Try.TryableSupplier<? extends T> supplier)
static <T> Try<T> success(T value)
static <T> Try<T> failure(java.lang.Throwable throwable)
static void silently(Try.TryableExpression... expressions)
<U> Try<U> map(Try.TryableFunction<T,? extends U> mapper)
Try<T> apply(Try.TryableConsumer<T> consumes)
Try<T> error(java.util.function.Function<? super java.lang.Throwable,? extends java.lang.Throwable> mapper)
Try<T> recover(java.util.function.Function<? super java.lang.Throwable,Try<? extends T>> mapper)
<E extends java.lang.Throwable> Try<T> recover(java.lang.Class<E> type, java.util.function.Function<E,Try<? extends T>> mapper)
T get()
void apply()
Copyright © 2019. All Rights Reserved.