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