T - the type of the operand and result of the operatorE - the type of the thrown checked exception@FunctionalInterface public interface ThrowingUnaryOperator<T,E extends Exception> extends ThrowingFunction<T,T,E>
Function for
the case where the operand and result are of the same type.
Function may throw a checked exception.ThrowingFunction| Modifier and Type | Method and Description |
|---|---|
static <T> UnaryOperator<T> |
sneaky(ThrowingUnaryOperator<T,?> operator)
Returns a new UnaryOperator instance which rethrows the checked exception using the Sneaky Throws pattern
|
default UnaryOperator<T> |
uncheck()
Returns a new UnaryOperator instance which wraps thrown checked exception instance into a RuntimeException
|
static <T> UnaryOperator<T> |
unchecked(ThrowingUnaryOperator<T,?> operator) |
static <T> UnaryOperator<T> unchecked(ThrowingUnaryOperator<T,?> operator)
static <T> UnaryOperator<T> sneaky(ThrowingUnaryOperator<T,?> operator)
default UnaryOperator<T> uncheck()
Copyright © 2020. All rights reserved.