T - function argument typeR - function result typeE - exception type@FunctionalInterface public interface CheckedFunction<T,R,E extends Throwable> extends Function<T,R>
Function that allows to throw checked exception.| Modifier and Type | Method and Description |
|---|---|
default R |
apply(T t)
Overrides
Function.apply(Object) method to allow calling functions that throw checked exceptions. |
R |
applyAndThrow(T t)
Applies function to the given argument.
|
default R apply(T t)
Function.apply(Object) method to allow calling functions that throw checked exceptions.
Is useful when used in methods that accept Function.
For example: Map.computeIfAbsent(Object, Function).Copyright © 2021 The Apache Software Foundation. All rights reserved.