E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<IntToLongFunction>@FunctionalInterface public interface IntToLongFunctionWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<IntToLongFunction>
int-to-long primitive specialization for
FunctionWithException.
long applyAsLong(int value) throws
E - The functional method.IntToLongFunctionIntToLongFunctionIntToLongFunctionIntToLongFunction| Modifier and Type | Method | Description |
|---|---|---|
long |
applyAsLong(int value) |
Applies this function to the given argument.
|
static <E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a function that always throw exception.
|
static <E extends Exception> |
ignored(IntToLongFunctionWithException<E> function) |
Converts a
IntToLongFunctionWithException to a lifted
IntToLongFunction returning 0 in case of exception. |
static <E extends Exception> |
lifted(IntToLongFunctionWithException<E> function) |
Converts a
IntToLongFunctionWithException to a lifted
IntToLongFunction returning 0 in case of exception. |
static <E extends Exception> |
unchecked(IntToLongFunctionWithException<E> function) |
Converts a
IntToLongFunctionWithException to a
IntToLongFunction that wraps exception to RuntimeException. |
static <E extends Exception> |
unchecked(IntToLongFunctionWithException<E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
IntToLongFunctionWithException to a
IntToLongFunction that wraps exception to RuntimeException by
using the provided mapping function. |
default IntToLongFunction |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, unchecklong applyAsLong(int value)
throws E extends Exception
value - the function argumentE - any exceptionE extends ExceptionIntToLongFunction.applyAsLong(int)default IntToLongFunction uncheckOrIgnore(boolean uncheck)
PrimitiveReturnExceptionHandlerSupportuncheckOrIgnore in interface PrimitiveReturnExceptionHandlerSupport<E extends Exception>uncheck - create unchecked version of the function when true, else ignored
version.static <E extends Exception> IntToLongFunctionWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <E extends Exception> IntToLongFunction unchecked(IntToLongFunctionWithException<E> function)
IntToLongFunctionWithException to a
IntToLongFunction that wraps exception to RuntimeException.E - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(IntToLongFunctionWithException, Function)static <E extends Exception> IntToLongFunction unchecked(IntToLongFunctionWithException<E> function, Function<Exception,RuntimeException> exceptionMapper)
IntToLongFunctionWithException to a
IntToLongFunction that wraps exception to RuntimeException by
using the provided mapping function.E - 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(IntToLongFunctionWithException)static <E extends Exception> IntToLongFunction lifted(IntToLongFunctionWithException<E> function)
IntToLongFunctionWithException to a lifted
IntToLongFunction returning 0 in case of exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.lift()static <E extends Exception> IntToLongFunction ignored(IntToLongFunctionWithException<E> function)
IntToLongFunctionWithException to a lifted
IntToLongFunction returning 0 in case of exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.