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