Interface ThrowableIntUnaryOperator

All Superinterfaces:
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 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:
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    applyAsInt(int operand)
    Applies this operator to the given operand.
    int
    applyAsIntUnsafe(int operand)
    Applies this operator to the given operand.
    Returns a unary operator that always returns its input argument.

    Methods inherited from interface java.util.function.IntUnaryOperator

    andThen, compose
  • Method Details

    • applyAsIntUnsafe

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

      default int applyAsInt(int operand)
      Applies this operator to the given operand.
      Specified by:
      applyAsInt in interface 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