T
- Type of resultpublic final class ScalarWithFallback<T> extends Object implements Scalar<T>
There is no thread-safety guarantee.
FuncWithFallback
Constructor and Description |
---|
ScalarWithFallback(Scalar<T> origin,
Class<? extends Throwable> exception,
Func<Throwable,T> fallback)
Ctor.
|
ScalarWithFallback(Scalar<T> origin,
Iterable<Class<? extends Throwable>> exceptions,
Func<Throwable,T> fallback)
Ctor.
|
ScalarWithFallback(Scalar<T> origin,
Iterable<FallbackFrom<T>> fbks)
Ctor.
|
public ScalarWithFallback(Scalar<T> origin, Class<? extends Throwable> exception, Func<Throwable,T> fallback)
origin
- Original scalarexception
- Supported exception typefallback
- Function that converts the given exception into fallback valuepublic ScalarWithFallback(Scalar<T> origin, Iterable<Class<? extends Throwable>> exceptions, Func<Throwable,T> fallback)
origin
- Original scalarexceptions
- Supported exceptions typesfallback
- Function that converts the given exception into fallback valuepublic ScalarWithFallback(Scalar<T> origin, Iterable<FallbackFrom<T>> fbks)
origin
- Original scalarfbks
- FallbacksCopyright © 2017–2020 Cactoos. All rights reserved.