T
- some generic flagE
- The extension@FunctionalInterface public interface ObjIntConsumerWithThrowable<T,E extends Throwable> extends ObjIntConsumer<T>
Modifier and Type | Method and Description |
---|---|
default void |
accept(T v1,
int v2)
Overridden method of ObjIntConsumerWithThrowable that will call acceptWithThrowable, but catching any exceptions.
|
void |
acceptWithThrowable(T v1,
int v2)
Functional method that will throw exceptions.
|
static <T,E extends Throwable> |
aObjIntConsumerThatUnsafelyThrowsUnchecked(ObjIntConsumerWithThrowable<T,E> objintconsumerwiththrowable)
Utility method to unwrap lambdas of type ObjIntConsumer and withUncheckedThrowable any Exception
|
static <T,E extends Throwable> |
asObjIntConsumerWithThrowable(ObjIntConsumer<T> objintconsumer)
Utility method to convert ObjIntConsumerWithThrowable
|
static <T,E extends Throwable> |
castObjIntConsumerWithThrowable(ObjIntConsumerWithThrowable<T,E> objintconsumerwiththrowable)
Utility method to mark lambdas of type ObjIntConsumerWithThrowable
|
default ObjIntConsumerWithThrowable<T,E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default ObjIntConsumerWithThrowable<T,E> |
onException(Consumer<Throwable> consumer) |
default ObjIntConsumer<T> |
thatThrowsNothing() |
default ObjIntConsumer<T> |
thatUnsafelyThrowsUnchecked() |
default ObjIntConsumerWithThrowable<T,E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default ObjIntConsumerWithThrowable<T,E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default ObjIntConsumerWithThrowable<T,E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <T,E extends Throwable> ObjIntConsumerWithThrowable<T,E> castObjIntConsumerWithThrowable(ObjIntConsumerWithThrowable<T,E> objintconsumerwiththrowable)
T
- Generic that corresponds to the same generic on ObjIntConsumerE
- The type this interface is allowed to throwobjintconsumerwiththrowable
- The interface instancestatic <T,E extends Throwable> ObjIntConsumer<T> aObjIntConsumerThatUnsafelyThrowsUnchecked(ObjIntConsumerWithThrowable<T,E> objintconsumerwiththrowable) throws E extends Throwable
T
- Generic that corresponds to the same generic on ObjIntConsumerE
- The type this interface is allowed to throwobjintconsumerwiththrowable
- The interface instanceE
- the original Exception from objintconsumerwiththrowableE extends Throwable
static <T,E extends Throwable> ObjIntConsumerWithThrowable<T,E> asObjIntConsumerWithThrowable(ObjIntConsumer<T> objintconsumer)
T
- Generic that corresponds to the same generic on ObjIntConsumerE
- The type this interface is allowed to throwobjintconsumer
- The interface instancedefault void accept(T v1, int v2)
accept
in interface ObjIntConsumer<T>
v1
- parameter to overridden methodv2
- parameter to overridden methodvoid acceptWithThrowable(T v1, int v2) throws E extends Throwable
default ObjIntConsumer<T> thatThrowsNothing()
default ObjIntConsumer<T> thatUnsafelyThrowsUnchecked() throws E extends Throwable
default ObjIntConsumerWithThrowable<T,E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault ObjIntConsumerWithThrowable<T,E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault ObjIntConsumerWithThrowable<T,E> withLogging()
default ObjIntConsumerWithThrowable<T,E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default ObjIntConsumerWithThrowable<T,E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.