Interface FailableIntUnaryOperator<E extends java.lang.Throwable>

  • Type Parameters:
    E - Thrown exception.

    public interface FailableIntUnaryOperator<E extends java.lang.Throwable>
    A functional interface like IntUnaryOperator that declares a Throwable.
    Since:
    3.11
    • Method Detail

      • identity

        static <E extends java.lang.Throwable> FailableIntUnaryOperator<E> identity()
        Returns a unary operator that always returns its input argument.
        Type Parameters:
        E - Thrown exception.
        Returns:
        a unary operator that always returns its input argument
      • nop

        static <E extends java.lang.Throwable> FailableIntUnaryOperator<E> nop()
        Returns The NOP singleton.
        Type Parameters:
        E - Thrown exception.
        Returns:
        The NOP singleton.
      • andThen

        default FailableIntUnaryOperator<E> andThen​(FailableIntUnaryOperator<E> after)
        Returns a composed FailableDoubleUnaryOperator like IntUnaryOperator.andThen(IntUnaryOperator).
        Parameters:
        after - the operator to apply after this one.
        Returns:
        a composed FailableIntUnaryOperator like IntUnaryOperator.andThen(IntUnaryOperator).
        Throws:
        java.lang.NullPointerException - if after is null.
        See Also:
        compose(FailableIntUnaryOperator)
      • applyAsInt

        int applyAsInt​(int operand)
                throws E extends java.lang.Throwable
        Applies this operator to the given operand.
        Parameters:
        operand - the operand
        Returns:
        the operator result
        Throws:
        E - Thrown when a consumer fails.
        E extends java.lang.Throwable
      • compose

        default FailableIntUnaryOperator<E> compose​(FailableIntUnaryOperator<E> before)
        Returns a composed FailableIntUnaryOperator like IntUnaryOperator.compose(IntUnaryOperator).
        Parameters:
        before - the operator to apply before this one.
        Returns:
        a composed FailableIntUnaryOperator like IntUnaryOperator.compose(IntUnaryOperator).
        Throws:
        java.lang.NullPointerException - if before is null.
        See Also:
        andThen(FailableIntUnaryOperator)