Func.NoNulls<X,Y>
Constructor and Description |
---|
FallbackFrom(Class<? extends Throwable> exp,
Func<Throwable,T> func)
Ctor.
|
FallbackFrom(Iterable<Class<? extends Throwable>> exps,
Func<Throwable,T> func)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
T |
apply(Throwable exp)
Apply it.
|
Integer |
support(Class<? extends Throwable> target)
Calculate level of support of the given exception type.
|
public FallbackFrom(Class<? extends Throwable> exp, Func<Throwable,T> func)
exp
- Supported exception typefunc
- Function that converts the given exception into required onepublic T apply(Throwable exp) throws Exception
Func
public Integer support(Class<? extends Throwable> target)
target
- Exception typeInteger.MIN_VALUE
otherwiseInheritanceLevel
Copyright © 2017–2018 Cactoos. All rights reserved.