T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the potential exception of the functionExceptionHandlerSupport<T,U>, PrimitiveReturnExceptionHandlerSupport<ToIntBiFunction<T,U>>@FunctionalInterface public interface ToIntBiFunctionWithException<T,U,E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<ToIntBiFunction<T,U>>
int-producing primitive specialization for
BiFunctionWithException.
int applyAsInt(T t, U u) throws
E - The functional method.ToIntBiFunction<T, U>ToIntBiFunction<T, U>ToIntBiFunction<T, U>ToIntBiFunction| Modifier and Type | Method | Description |
|---|---|---|
int |
applyAsInt(T t,
U u) |
Applies this function to the given arguments.
|
static <T,U,E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a function that always throw exception.
|
static <T,U,E extends Exception> |
ignored(ToIntBiFunctionWithException<T,U,E> function) |
Converts a
ToIntBiFunctionWithException to a lifted
ToIntBiFunction returning 0 in case of exception. |
static <T,U,E extends Exception> |
lifted(ToIntBiFunctionWithException<T,U,E> function) |
Converts a
ToIntBiFunctionWithException to a lifted
ToIntBiFunction returning 0 in case of exception. |
static <T,U,E extends Exception> |
unchecked(ToIntBiFunctionWithException<T,U,E> function) |
Converts a
ToIntBiFunctionWithException to a ToIntBiFunction
that wraps exception to RuntimeException. |
static <T,U,E extends Exception> |
unchecked(ToIntBiFunctionWithException<T,U,E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
ToIntBiFunctionWithException to a ToIntBiFunction
that wraps exception to RuntimeException by using the provided
mapping function. |
default ToIntBiFunction<T,U> |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckint applyAsInt(T t, U u) throws E extends Exception
t - the first function argumentu - the second function argumentE - any exceptionE extends ExceptionToIntBiFunction.applyAsInt(Object, Object)default ToIntBiFunction<T,U> uncheckOrIgnore(boolean uncheck)
PrimitiveReturnExceptionHandlerSupportuncheckOrIgnore in interface PrimitiveReturnExceptionHandlerSupport<T>uncheck - create unchecked version of the function when true, else ignored
version.static <T,U,E extends Exception> ToIntBiFunctionWithException<T,U,E> failing(Supplier<E> exceptionBuilder)
T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <T,U,E extends Exception> ToIntBiFunction<T,U> unchecked(ToIntBiFunctionWithException<T,U,E> function)
ToIntBiFunctionWithException to a ToIntBiFunction
that wraps exception to RuntimeException.T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(ToIntBiFunctionWithException, Function)static <T,U,E extends Exception> ToIntBiFunction<T,U> unchecked(ToIntBiFunctionWithException<T,U,E> function, Function<Exception,RuntimeException> exceptionMapper)
ToIntBiFunctionWithException to a ToIntBiFunction
that wraps exception to RuntimeException by using the provided
mapping function.T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the potential exceptionfunction - the be uncheckedexceptionMapper - a function to convert the exception to the runtime exception.NullPointerException - if function or exceptionMapper is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(ToIntBiFunctionWithException)static <T,U,E extends Exception> ToIntBiFunction<T,U> lifted(ToIntBiFunctionWithException<T,U,E> function)
ToIntBiFunctionWithException to a lifted
ToIntBiFunction returning 0 in case of exception.T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.lift()static <T,U,E extends Exception> ToIntBiFunction<T,U> ignored(ToIntBiFunctionWithException<T,U,E> function)
ToIntBiFunctionWithException to a lifted
ToIntBiFunction returning 0 in case of exception.T - the type of the first argument to the functionU - the type of the second argument to the functionE - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.