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<ToLongBiFunction<T,U>>@FunctionalInterface public interface ToLongBiFunctionWithException<T,U,E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<ToLongBiFunction<T,U>>
long-producing primitive
specialization for BiFunctionWithException.
long applyAsLong(T t, U u) throws
E - The functional method.ToLongBiFunction<T, U>ToLongBiFunction<T, U>ToLongBiFunction<T, U>ToLongBiFunction| Modifier and Type | Method | Description |
|---|---|---|
long |
applyAsLong(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(ToLongBiFunctionWithException<T,U,E> function) |
Converts a
ToLongBiFunctionWithException to a lifted
ToLongBiFunction returning 0 in case of exception. |
static <T,U,E extends Exception> |
lifted(ToLongBiFunctionWithException<T,U,E> function) |
Converts a
ToLongBiFunctionWithException to a lifted
ToLongBiFunction returning 0 in case of exception. |
static <T,U,E extends Exception> |
unchecked(ToLongBiFunctionWithException<T,U,E> function) |
Converts a
ToLongBiFunctionWithException to a
ToLongBiFunction that wraps exception to RuntimeException. |
static <T,U,E extends Exception> |
unchecked(ToLongBiFunctionWithException<T,U,E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
ToLongBiFunctionWithException to a
ToLongBiFunction that wraps exception to RuntimeException by
using the provided mapping function. |
default ToLongBiFunction<T,U> |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, unchecklong applyAsLong(T t, U u) throws E extends Exception
t - the first function argumentu - the second function argumentE - any exceptionE extends ExceptionToLongBiFunction.applyAsLong(Object, Object)default ToLongBiFunction<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> ToLongBiFunctionWithException<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> ToLongBiFunction<T,U> unchecked(ToLongBiFunctionWithException<T,U,E> function)
ToLongBiFunctionWithException to a
ToLongBiFunction 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(ToLongBiFunctionWithException, Function)static <T,U,E extends Exception> ToLongBiFunction<T,U> unchecked(ToLongBiFunctionWithException<T,U,E> function, Function<Exception,RuntimeException> exceptionMapper)
ToLongBiFunctionWithException to a
ToLongBiFunction 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(ToLongBiFunctionWithException)static <T,U,E extends Exception> ToLongBiFunction<T,U> lifted(ToLongBiFunctionWithException<T,U,E> function)
ToLongBiFunctionWithException to a lifted
ToLongBiFunction 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> ToLongBiFunction<T,U> ignored(ToLongBiFunctionWithException<T,U,E> function)
ToLongBiFunctionWithException to a lifted
ToLongBiFunction 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.