Package org.cactoos
Interface Fallback<X>
-
- Type Parameters:
X
- Type of input
- All Known Implementing Classes:
Fallback.From
,Fallback.None
public interface Fallback<X> extends Func<Throwable,X>
Fallback from aThrowable
.There is no thread-safety guarantee.
- Since:
- 1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Fallback.From<T>
Fallback from exception.static class
Fallback.None<X>
No fallback.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
support(Throwable exception)
Calculate level of support of the given exception type.
-
-
-
Method Detail
-
support
int support(Throwable exception)
Calculate level of support of the given exception type.- Parameters:
exception
- Exception- Returns:
- Level of support: greater or equals to 0 if the target
is supported and
Integer.MIN_VALUE
otherwise
-
-