@FunctionalInterface public interface ThrowingObjLongConsumer<T> extends ObjLongConsumer<T>
object-valued and a long-valued argument, and returns no result, possibly throwing an exception.| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T former,
long latter)
Performs this operation on the given arguments.
|
void |
acceptThrowing(T former,
long latter)
Performs this operation on the given arguments.
|
default ObjLongConsumer<T> |
fallbackTo(ObjLongConsumer<T> fallback)
Returns an
ObjLongConsumer performing the given operation on the arguments if this operation throws an exception. |
default ObjLongConsumer<T> |
fallbackTo(ObjLongConsumer<T> fallback,
Consumer<Exception> exceptionConsumer)
Returns an
ObjLongConsumer performing the given operation on the arguments if this operation throws an exception. |
default ThrowingObjLongConsumer<T> |
orThrow(Class<? extends RuntimeException> exceptionClass)
Returns a
ThrowingObjLongConsumer throwing an exception of the given type if this operation throws an exception. |
default ThrowingObjLongConsumer<T> |
orThrow(Class<? extends RuntimeException> exceptionClass,
String message)
Returns a
ThrowingObjLongConsumer throwing an exception of the given type if this operation throws an exception. |
default ThrowingObjLongConsumer<T> |
orTryWith(ThrowingObjLongConsumer<? super T> other)
Returns a
ThrowingObjLongConsumer performing the given operation on the arguments if this operation throws an exception. |
default ThrowingObjLongConsumer<T> |
orTryWith(ThrowingObjLongConsumer<? super T> other,
Consumer<Exception> exceptionConsumer)
Returns a
ThrowingObjLongConsumer performing the given operation on the arguments if this operation throws an exception. |
default void accept(T former, long latter)
UncheckedException.accept in interface ObjLongConsumer<T>void acceptThrowing(T former, long latter) throws Exception
Exceptiondefault ObjLongConsumer<T> fallbackTo(ObjLongConsumer<T> fallback)
ObjLongConsumer performing the given operation on the arguments if this operation throws an exception.IllegalArgumentException - if fallback is nulldefault ObjLongConsumer<T> fallbackTo(ObjLongConsumer<T> fallback, Consumer<Exception> exceptionConsumer)
ObjLongConsumer performing the given operation on the arguments if this operation throws an exception.IllegalArgumentException - if fallback is nulldefault ThrowingObjLongConsumer<T> orThrow(Class<? extends RuntimeException> exceptionClass)
ThrowingObjLongConsumer throwing an exception of the given type if this operation throws an exception.
The original exception thrown by this operation is the cause of the thrown exception.
The exception class must have a constructor accepting a single Throwable as an argument.
IllegalArgumentException - if exceptionClass is nulldefault ThrowingObjLongConsumer<T> orThrow(Class<? extends RuntimeException> exceptionClass, String message)
ThrowingObjLongConsumer throwing an exception of the given type if this operation throws an exception.
The original exception thrown by this operation is the cause of the thrown exception.
The exception class must have a constructor accepting String and Throwable as arguments.
IllegalArgumentException - if exceptionClass is nulldefault ThrowingObjLongConsumer<T> orTryWith(ThrowingObjLongConsumer<? super T> other)
ThrowingObjLongConsumer performing the given operation on the arguments if this operation throws an exception.IllegalArgumentException - if other is nulldefault ThrowingObjLongConsumer<T> orTryWith(ThrowingObjLongConsumer<? super T> other, Consumer<Exception> exceptionConsumer)
ThrowingObjLongConsumer performing the given operation on the arguments if this operation throws an exception.IllegalArgumentException - if other is null