E
- The extension@FunctionalInterface public interface DoubleConsumerWithThrowable<E extends Throwable> extends DoubleConsumer
Modifier and Type | Method and Description |
---|---|
default void |
accept(double v1)
Overridden method of DoubleConsumerWithThrowable that will call acceptWithThrowable, but catching any exceptions.
|
void |
acceptWithThrowable(double v1)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
aDoubleConsumerThatUnsafelyThrowsUnchecked(DoubleConsumerWithThrowable<E> doubleconsumerwiththrowable)
Utility method to unwrap lambdas of type DoubleConsumer and withUncheckedThrowable any Exception
|
static <E extends Throwable> |
asDoubleConsumerWithThrowable(DoubleConsumer doubleconsumer)
Utility method to convert DoubleConsumerWithThrowable
|
static <E extends Throwable> |
castDoubleConsumerWithThrowable(DoubleConsumerWithThrowable<E> doubleconsumerwiththrowable)
Utility method to mark lambdas of type DoubleConsumerWithThrowable
|
default DoubleConsumerWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default DoubleConsumerWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default DoubleConsumer |
thatThrowsNothing() |
default DoubleConsumer |
thatUnsafelyThrowsUnchecked() |
default DoubleConsumerWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleConsumerWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleConsumerWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
andThen
static <E extends Throwable> DoubleConsumerWithThrowable<E> castDoubleConsumerWithThrowable(DoubleConsumerWithThrowable<E> doubleconsumerwiththrowable)
E
- The type this interface is allowed to throwdoubleconsumerwiththrowable
- The interface instancestatic <E extends Throwable> DoubleConsumer aDoubleConsumerThatUnsafelyThrowsUnchecked(DoubleConsumerWithThrowable<E> doubleconsumerwiththrowable) throws E extends Throwable
E
- The type this interface is allowed to throwdoubleconsumerwiththrowable
- The interface instanceE
- the original Exception from doubleconsumerwiththrowableE extends Throwable
static <E extends Throwable> DoubleConsumerWithThrowable<E> asDoubleConsumerWithThrowable(DoubleConsumer doubleconsumer)
E
- The type this interface is allowed to throwdoubleconsumer
- The interface instancedefault void accept(double v1)
accept
in interface DoubleConsumer
v1
- parameter to overridden methodvoid acceptWithThrowable(double v1) throws E extends Throwable
default DoubleConsumer thatThrowsNothing()
default DoubleConsumer thatUnsafelyThrowsUnchecked() throws E extends Throwable
default DoubleConsumerWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault DoubleConsumerWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault DoubleConsumerWithThrowable<E> withLogging()
default DoubleConsumerWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default DoubleConsumerWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.