Try.Failure<T>, Try.Success<T>| Modifier and Type | Method and Description |
|---|---|
<B> Try<B> |
flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
Try<T> |
onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
onSuccess(java.util.function.Consumer<? super T> onSuccess) |
<X extends Throwable> |
orElseThrow(java.util.function.Function<? super Throwable,? extends X> exceptionSupplier) |
T |
recoverWith(java.util.function.Function<? super Throwable,T> t) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapply, failure, filter, fold, isSuccess, map, orElseThrow, orElseThrow, recoverWith, self, successpublic <B> Try<B> flatmap(java.util.function.Function<? super T,Try<B>> mapper)
public Try<T> onSuccess(java.util.function.Consumer<? super T> onSuccess)
public Try<T> onFailure(java.util.function.Consumer<? super Throwable> onFailure)
public <X extends Throwable> T orElseThrow(java.util.function.Function<? super Throwable,? extends X> exceptionSupplier) throws X extends Throwable
orElseThrow in interface Try<T>X extends Throwablepublic T recoverWith(java.util.function.Function<? super Throwable,T> t)
recoverWith in interface Try<T>Copyright © 2020. All rights reserved.