E
- The extension@FunctionalInterface public interface LongUnaryOperatorWithThrowable<E extends Throwable> extends LongUnaryOperator
Modifier and Type | Method and Description |
---|---|
static <E extends Throwable> |
aLongUnaryOperatorThatUnsafelyThrowsUnchecked(LongUnaryOperatorWithThrowable<E> longunaryoperatorwiththrowable)
Utility method to unwrap lambdas of type LongUnaryOperator and withUncheckedThrowable any Exception
|
default long |
applyAsLong(long v1)
Overridden method of LongUnaryOperatorWithThrowable that will call applyAsLongWithThrowable, but catching any exceptions.
|
long |
applyAsLongWithThrowable(long v1)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
asLongUnaryOperatorWithThrowable(LongUnaryOperator longunaryoperator)
Utility method to convert LongUnaryOperatorWithThrowable
|
static <E extends Throwable> |
castLongUnaryOperatorWithThrowable(LongUnaryOperatorWithThrowable<E> longunaryoperatorwiththrowable)
Utility method to mark lambdas of type LongUnaryOperatorWithThrowable
|
default LongUnaryOperatorWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default LongUnaryOperatorWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default LongUnaryOperator |
thatReturnsOnCatch(long defaultReturnValue) |
default LongUnaryOperator |
thatUnsafelyThrowsUnchecked() |
default LongUnaryOperatorWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongUnaryOperatorWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongUnaryOperatorWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
andThen, compose, identity
static <E extends Throwable> LongUnaryOperatorWithThrowable<E> castLongUnaryOperatorWithThrowable(LongUnaryOperatorWithThrowable<E> longunaryoperatorwiththrowable)
E
- The type this interface is allowed to throwlongunaryoperatorwiththrowable
- The interface instancestatic <E extends Throwable> LongUnaryOperator aLongUnaryOperatorThatUnsafelyThrowsUnchecked(LongUnaryOperatorWithThrowable<E> longunaryoperatorwiththrowable) throws E extends Throwable
E
- The type this interface is allowed to throwlongunaryoperatorwiththrowable
- The interface instanceE
- the original Exception from longunaryoperatorwiththrowableE extends Throwable
static <E extends Throwable> LongUnaryOperatorWithThrowable<E> asLongUnaryOperatorWithThrowable(LongUnaryOperator longunaryoperator)
E
- The type this interface is allowed to throwlongunaryoperator
- The interface instancedefault long applyAsLong(long v1)
applyAsLong
in interface LongUnaryOperator
v1
- parameter to overridden methodlong applyAsLongWithThrowable(long v1) throws E extends Throwable
default LongUnaryOperator thatReturnsOnCatch(long defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default LongUnaryOperator thatUnsafelyThrowsUnchecked() throws E extends Throwable
default LongUnaryOperatorWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault LongUnaryOperatorWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault LongUnaryOperatorWithThrowable<E> withLogging()
default LongUnaryOperatorWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default LongUnaryOperatorWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.