Interface ThrowableLongUnaryOperator

  • All Superinterfaces:
    java.util.function.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 java.util.function.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:
    ThrowableUnaryOperator
    • Method Detail

      • applyAsLongUnsafe

        long applyAsLongUnsafe​(long 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
      • applyAsLong

        default long applyAsLong​(long operand)
        Applies this operator to the given operand.
        Specified by:
        applyAsLong in interface java.util.function.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