Interface ThrowableIntUnaryOperator

  • All Superinterfaces:
    java.util.function.IntUnaryOperator
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ThrowableIntUnaryOperator
    extends java.util.function.IntUnaryOperator
    Represents an operation on a single int-valued operand that produces an int-valued result. This is the primitive type specialization of ThrowableUnaryOperator for int.

    Permits checked exceptions unlike IntUnaryOperator

    This is a functional interface whose functional method is applyAsInt(int).

    See Also:
    ThrowableUnaryOperator
    • Method Detail

      • applyAsIntUnsafe

        int applyAsIntUnsafe​(int operand)
                      throws java.lang.Throwable
        Applies this operator to the given operand.
        Parameters:
        operand - the operand
        Returns:
        the operator result
        Throws:
        java.lang.Throwable - occurred during processing
      • applyAsInt

        default int applyAsInt​(int operand)
        Applies this operator to the given operand.
        Specified by:
        applyAsInt in interface java.util.function.IntUnaryOperator
        Parameters:
        operand - the operand
        Returns:
        the operator result
      • identity

        static ThrowableIntUnaryOperator identity()
        Returns a unary operator that always returns its input argument.
        Returns:
        a unary operator that always returns its input argument