| Package | Description |
|---|---|
| org.sellcom.core.util.function |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ThrowingUnaryOperator<T>
Represents an operation on a single operand that produces a result of the same type as its operand, possibly throwing an exception.
|
| Modifier and Type | Method and Description |
|---|---|
default <V> ThrowingFunction<T,V> |
ThrowingFunction.andThen(ThrowingFunction<? super R,? extends V> after)
Returns a composed
ThrowingFunction that first applies this function to the argument, and then applies the after function to the result. |
default <V> ThrowingFunction<V,R> |
ThrowingFunction.compose(ThrowingFunction<? super V,? extends T> before)
Returns a composed
ThrowingFunction that first applies the before function to the argument, and then applies this function to the result. |
default ThrowingFunction<T,R> |
ThrowingFunction.orThrow(Class<? extends RuntimeException> exceptionClass)
Returns a
ThrowingFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingFunction<T,R> |
ThrowingFunction.orThrow(Class<? extends RuntimeException> exceptionClass,
String message)
Returns a
ThrowingFunction throwing an exception of the given type if this function throws an exception. |
default ThrowingFunction<T,R> |
ThrowingFunction.orTryWith(ThrowingFunction<? super T,? extends R> other)
Returns a
ThrowingFunction applying the given function to the argument if this function throws an exception. |
default ThrowingFunction<T,R> |
ThrowingFunction.orTryWith(ThrowingFunction<? super T,? extends R> other,
Consumer<Exception> exceptionConsumer)
Returns a
ThrowingFunction applying the given function to the argument if this function throws an exception. |
| Modifier and Type | Method and Description |
|---|---|
default <V> ThrowingBiFunction<T,U,V> |
ThrowingBiFunction.andThen(ThrowingFunction<? super R,? extends V> after)
Returns a composed
ThrowingBiFunction that first applies this function to the arguments, and then applies the after function to the result. |
default <V> ThrowingFunction<T,V> |
ThrowingFunction.andThen(ThrowingFunction<? super R,? extends V> after)
Returns a composed
ThrowingFunction that first applies this function to the argument, and then applies the after function to the result. |
default <V> ThrowingFunction<V,R> |
ThrowingFunction.compose(ThrowingFunction<? super V,? extends T> before)
Returns a composed
ThrowingFunction that first applies the before function to the argument, and then applies this function to the result. |
default ThrowingFunction<T,R> |
ThrowingFunction.orTryWith(ThrowingFunction<? super T,? extends R> other)
Returns a
ThrowingFunction applying the given function to the argument if this function throws an exception. |
default ThrowingFunction<T,R> |
ThrowingFunction.orTryWith(ThrowingFunction<? super T,? extends R> other,
Consumer<Exception> exceptionConsumer)
Returns a
ThrowingFunction applying the given function to the argument if this function throws an exception. |