Interface FailableLongUnaryOperator<E extends java.lang.Throwable>

  • Type Parameters:
    E - Thrown exception.

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

      • identity

        static <E extends java.lang.Throwable> FailableLongUnaryOperator<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> FailableLongUnaryOperator<E> nop()
        Returns The NOP singleton.
        Type Parameters:
        E - Thrown exception.
        Returns:
        The NOP singleton.
      • andThen

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

        long applyAsLong​(long 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 FailableLongUnaryOperator<E> compose​(FailableLongUnaryOperator<E> before)
        Returns a composed FailableLongUnaryOperator like LongUnaryOperator.compose(LongUnaryOperator).
        Parameters:
        before - the operator to apply before this one.
        Returns:
        a composed FailableLongUnaryOperator like LongUnaryOperator.compose(LongUnaryOperator).
        Throws:
        java.lang.NullPointerException - if before is null.
        See Also:
        andThen(FailableLongUnaryOperator)