Package de.scravy.bedrock
Class Try.Failure<E>
java.lang.Object
de.scravy.bedrock.Try<E>
de.scravy.bedrock.Try.Failure<E>
- All Implemented Interfaces:
Iterable<E>
@Immutable public static final class Try.Failure<E> extends Try<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class de.scravy.bedrock.Try
Try.FailedRecoveringException, Try.Failure<E>, Try.RethrownException, Try.Success<E> -
Method Summary
Methods inherited from class de.scravy.bedrock.Try
execute, failure, flatMapOptional, fromOptional, getException, isSuccess, lift, run, run, success, unfailable
-
Method Details
-
isFailure
public final boolean isFailure() -
map
-
flatMap
-
filter
-
recover
-
recoverWith
- Specified by:
recoverWithin classTry<E>
-
orElse
-
orElseDo
-
orElseGet
-
orElseNull
- Specified by:
orElseNullin classTry<E>
-
orElseThrow
- Specified by:
orElseThrowin classTry<E>- Throws:
Try.RethrownException
-
orElseThrowRuntime
- Specified by:
orElseThrowRuntimein classTry<E>
-
get
-
otherwise
-
transform
@Nonnull public <F> Try<F> transform(@Nonnull ThrowingFunction<Exception,F> f, @Nonnull ThrowingFunction<E,F> g) -
transformWith
@Nonnull public <F> Try<F> transformWith(@Nonnull ThrowingFunction<Exception,Try<F>> f, @Nonnull ThrowingFunction<E,Try<F>> g)- Specified by:
transformWithin classTry<E>
-
toOptional
- Specified by:
toOptionalin classTry<E>
-
toPromise
-
fallback
-
fallbackWith
- Specified by:
fallbackWithin classTry<E>
-
fold
public <F> F fold(@Nonnull ThrowingFunction<? super Exception,F> ifFailure, @Nonnull ThrowingFunction<E,F> ifSuccess) -
consume
public void consume(@Nonnull ThrowingConsumer<? super Exception> ifFailure, @Nonnull ThrowingConsumer<E> ifSuccess) -
iterator
-