| Package | Description |
|---|---|
| com.annimon.stream |
| Modifier and Type | Method and Description |
|---|---|
Exceptional<T> |
Exceptional.ifException(Consumer<Throwable> consumer)
Invokes consumer function if there were any exception.
|
<E extends Throwable> |
Exceptional.ifExceptionIs(Class<E> throwableClass,
Consumer<? super E> consumer)
Invokes consumer function if exception class matches
throwableClass. |
Exceptional<T> |
Exceptional.ifPresent(Consumer<? super T> consumer)
Invokes consumer function with value if present.
|
<U> Exceptional<U> |
Exceptional.map(ThrowableFunction<? super T,? extends U,Throwable> mapper)
Invokes mapping function on inner value if there were no exceptions.
|
static <T> Exceptional<T> |
Exceptional.of(Throwable throwable)
Returns an
Exceptional with throwable already set. |
static <T> Exceptional<T> |
Exceptional.of(ThrowableSupplier<T,Throwable> supplier)
Returns an
Exceptional with value provided by given ThrowableSupplier function. |
Exceptional<T> |
Exceptional.or(Supplier<Exceptional<T>> supplier)
Returns current
Exceptional if there were no exceptions, otherwise
returns an Exceptional produced by supplier function. |
Exceptional<T> |
Exceptional.recover(ThrowableFunction<Throwable,? extends T,Throwable> function)
Returns current
Exceptional if there were no exceptions, otherwise
calls function and wraps produced result with an Exceptional. |
Exceptional<T> |
Exceptional.recoverWith(Function<Throwable,? extends Exceptional<T>> function)
Returns current
Exceptional if there were no exceptions, otherwise
returns an Exceptional produced by function. |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
Exceptional.custom(Function<Exceptional<T>,R> function)
Applies custom operator on
Exceptional. |
Exceptional<T> |
Exceptional.or(Supplier<Exceptional<T>> supplier)
Returns current
Exceptional if there were no exceptions, otherwise
returns an Exceptional produced by supplier function. |
Exceptional<T> |
Exceptional.recoverWith(Function<Throwable,? extends Exceptional<T>> function)
Returns current
Exceptional if there were no exceptions, otherwise
returns an Exceptional produced by function. |
Copyright © 2018. All rights reserved.