Package org.cactoos

Class Fallback.None<X>

  • Type Parameters:
    X - Type of result.
    All Implemented Interfaces:
    Fallback<X>, Func<Throwable,​X>
    Enclosing interface:
    Fallback<X>

    public static final class Fallback.None<X>
    extends Object
    implements Fallback<X>
    No fallback. Throw unchecked exception.
    Since:
    1.0
    • Constructor Detail

      • None

        public None()
    • Method Detail

      • support

        public int support​(Throwable exception)
        Description copied from interface: Fallback
        Calculate level of support of the given exception type.
        Specified by:
        support in interface Fallback<X>
        Parameters:
        exception - Exception
        Returns:
        Level of support: greater or equals to 0 if the target is supported and Integer.MIN_VALUE otherwise