Package org.cactoos
Class Fallback.From<T>
- java.lang.Object
-
- org.cactoos.Fallback.From<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cactoos.Fallback
Fallback.From<T>, Fallback.None<X>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
apply(Throwable exp)
Apply it.int
support(Throwable exception)
Calculate level of support of the given exception type.
-
-
-
Method Detail
-
apply
public T apply(Throwable exp) throws Exception
Description copied from interface:Func
Apply it.
-
support
public int support(Throwable exception)
Description copied from interface:Fallback
Calculate level of support of the given exception type.- Specified by:
support
in interfaceFallback<T>
- Parameters:
exception
- Exception- Returns:
- Level of support: greater or equals to 0 if the target
is supported and
Integer.MIN_VALUE
otherwise
-
-