Interface ThrowableLongUnaryOperator

All Superinterfaces:
LongUnaryOperator
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 ThrowableLongUnaryOperator extends LongUnaryOperator
Represents an operation on a single long-valued operand that produces a long-valued result. This is the primitive type specialization of ThrowableUnaryOperator for long.

Permits checked exceptions unlike LongUnaryOperator

This is a functional interface whose functional method is applyAsLong(long).

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default long
    applyAsLong(long operand)
    Applies this operator to the given operand.
    long
    applyAsLongUnsafe(long 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.LongUnaryOperator

    andThen, compose
  • Method Details

    • applyAsLongUnsafe

      long applyAsLongUnsafe(long operand) throws Throwable
      Applies this operator to the given operand.
      Parameters:
      operand - the operand
      Returns:
      the operator result
      Throws:
      Throwable - occurred during processing
    • applyAsLong

      default long applyAsLong(long operand)
      Applies this operator to the given operand.
      Specified by:
      applyAsLong in interface LongUnaryOperator
      Parameters:
      operand - the operand
      Returns:
      the operator result
    • identity

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