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