FailableLongFunction

@FunctionalInterface public interface org.apache.commons.lang3.function.FailableLongFunction<R, E extends Throwable>[source]

A functional interface like LongFunction that declares a Throwable.

Type parameters:
  • <R> – Return type.

  • <E> – The kind of thrown exception or error.

Since:

3.11

Fields and constants

static final FailableLongFunction

NOP

NOP singleton

static final FailableLongFunction NOP[source]

NOP singleton

Methods

R

apply(long input)

Applies this function.

static <R, E extends Throwable> FailableLongFunction<R, E>

nop()

Gets the NOP singleton.

R apply(long input) throws E[source]

Applies this function.

Parameters:

input – The input for the function

Returns:

The result of the function

Throws:

E – Thrown when the function fails.

static <R, E extends Throwable> FailableLongFunction<R, E> nop()[source]

Gets the NOP singleton.

Type parameters:
  • <R> – Return type.

  • <E> – The kind of thrown exception or error.

Returns:

The NOP singleton.