T
- The type of the input to the function.@FunctionalInterface public interface ToLongIOFunction<T>
IOException
throwing equivalent of ToLongFunction
.Modifier and Type | Method and Description |
---|---|
long |
applyAsLong(T value)
Applies this function to the given argument.
|
static <T> ToLongIOFunction<T> |
checked(ToLongFunction<? super T> function)
Returns a function that applies the
function function to its input, and unwraps any UncheckedIOException that is thrown by
throwing its cause . |
static <T> ToLongFunction<T> |
unchecked(ToLongIOFunction<? super T> function)
Returns a function that applies the
function function to its input, and wraps any IOException that is thrown in an
UncheckedIOException . |
long applyAsLong(T value) throws IOException
value
- The function argument.IOException
- If an I/O error occurs.static <T> ToLongFunction<T> unchecked(ToLongIOFunction<? super T> function)
function
function to its input, and wraps any IOException
that is thrown in an
UncheckedIOException
.T
- The type of the first argument to the function.function
- The function to apply when the returned function is applied.function
function to its input, and wraps any IOException
that is thrown in an
UncheckedIOException
.NullPointerException
- If function
is null
.static <T> ToLongIOFunction<T> checked(ToLongFunction<? super T> function)
function
function to its input, and unwraps any UncheckedIOException
that is thrown by
throwing its cause
.T
- The type of the first argument to the function.function
- The function to apply when the returned function is applied.function
function to its input, and unwraps any UncheckedIOException
that is thrown.NullPointerException
- If function
is null
.Copyright © 2017–2020. All rights reserved.