java.util.function.LongToIntFunction@FunctionalInterface
public interface ThrowingLongToIntFunction
extends java.util.function.LongToIntFunction
long-valued argument and produces an int-valued result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default int |
applyAsInt(long argument) |
Applies this function to the given argument.
|
int |
applyAsIntThrowing(long argument) |
Applies this function to the given argument.
|
default java.util.function.LongToIntFunction |
fallbackTo(java.util.function.LongToIntFunction fallback) |
Returns a
LongToIntFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.LongToIntFunction |
fallbackTo(java.util.function.LongToIntFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongToIntFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.LongToIntFunction |
orReturn(int value) |
Returns a
LongToIntFunction returning the given value if this function throws an exception. |
default java.util.function.LongToIntFunction |
orReturn(int value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
LongToIntFunction returning the given value if this function throws an exception. |
default ThrowingLongToIntFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingLongToIntFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingLongToIntFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingLongToIntFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingLongToIntFunction |
orTryWith(ThrowingLongToIntFunction other) |
Returns a
ThrowingLongToIntFunction applying the given function to the argument if this function throws an exception. |
default ThrowingLongToIntFunction |
orTryWith(ThrowingLongToIntFunction other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingLongToIntFunction applying the given function to the argument if this function throws an exception. |
default int applyAsInt(long argument)
UncheckedException.applyAsInt in interface java.util.function.LongToIntFunctionint applyAsIntThrowing(long argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.LongToIntFunction fallbackTo(java.util.function.LongToIntFunction fallback)
LongToIntFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongToIntFunction fallbackTo(java.util.function.LongToIntFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongToIntFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.LongToIntFunction orReturn(int value)
LongToIntFunction returning the given value if this function throws an exception.default java.util.function.LongToIntFunction orReturn(int value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
LongToIntFunction returning the given value if this function throws an exception.default ThrowingLongToIntFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingLongToIntFunction throwing an exception of the given type if this function throws an exception.
The original exception thrown by this function is the cause of the thrown exception.
The exception class must have a constructor accepting a single Throwable as an argument.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingLongToIntFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingLongToIntFunction throwing an exception of the given type if this function throws an exception.
The original exception thrown by this function is the cause of the thrown exception.
The exception class must have a constructor accepting String and Throwable as arguments.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingLongToIntFunction orTryWith(ThrowingLongToIntFunction other)
ThrowingLongToIntFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingLongToIntFunction orTryWith(ThrowingLongToIntFunction other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingLongToIntFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is null