java.util.function.IntToLongFunction@FunctionalInterface
public interface ThrowingIntToLongFunction
extends java.util.function.IntToLongFunction
int-valued argument and produces a long-valued result, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default long |
applyAsLong(int argument) |
Applies this function to the given argument.
|
long |
applyAsLongThrowing(int argument) |
Applies this function to the given argument.
|
default java.util.function.IntToLongFunction |
fallbackTo(java.util.function.IntToLongFunction fallback) |
Returns an
IntToLongFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.IntToLongFunction |
fallbackTo(java.util.function.IntToLongFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns an
IntToLongFunction applying the given function to the argument if this function throws an exception. |
default java.util.function.IntToLongFunction |
orReturn(long value) |
Returns an
IntToLongFunction returning the given value if this function throws an exception. |
default java.util.function.IntToLongFunction |
orReturn(long value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns an
IntToLongFunction returning the given value if this function throws an exception. |
default ThrowingIntToLongFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingIntToLongFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingIntToLongFunction |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingIntToLongFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingIntToLongFunction |
orTryWith(ThrowingIntToLongFunction other) |
Returns a
ThrowingIntToLongFunction applying the given function to the argument if this function throws an exception. |
default ThrowingIntToLongFunction |
orTryWith(ThrowingIntToLongFunction other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingIntToLongFunction applying the given function to the argument if this function throws an exception. |
default long applyAsLong(int argument)
UncheckedException.applyAsLong in interface java.util.function.IntToLongFunctionlong applyAsLongThrowing(int argument)
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.IntToLongFunction fallbackTo(java.util.function.IntToLongFunction fallback)
IntToLongFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntToLongFunction fallbackTo(java.util.function.IntToLongFunction fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntToLongFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.IntToLongFunction orReturn(long value)
IntToLongFunction returning the given value if this function throws an exception.default java.util.function.IntToLongFunction orReturn(long value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
IntToLongFunction returning the given value if this function throws an exception.default ThrowingIntToLongFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingIntToLongFunction 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 ThrowingIntToLongFunction orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingIntToLongFunction 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 ThrowingIntToLongFunction orTryWith(ThrowingIntToLongFunction other)
ThrowingIntToLongFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingIntToLongFunction orTryWith(ThrowingIntToLongFunction other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingIntToLongFunction applying the given function to the argument if this function throws an exception.java.lang.IllegalArgumentException - if other is null