MCPcopy Create free account
hub / github.com/apache/commons-lang / apply

Method apply

src/main/java/org/apache/commons/lang3/Functions.java:325–328  ·  view source on GitHub ↗

Applies a function and rethrows any exception as a RuntimeException. @param function the function to apply @param input1 the first input to apply function on @param input2 the second input to apply function on @param the type of the first argument the function accepts @

(final FailableBiFunction<O1, O2, O, T> function,
        final O1 input1, final O2 input2)

Source from the content-addressed store, hash-verified

323 * @return the value returned from the function
324 */
325 public static <O1, O2, O, T extends Throwable> O apply(final FailableBiFunction<O1, O2, O, T> function,
326 final O1 input1, final O2 input2) {
327 return get(() -> function.apply(input1, input2));
328 }
329
330 /**
331 * Applies a function and rethrows any exception as a {@link RuntimeException}.

Callers 6

testApplyBiFunctionMethod · 0.95
testApplyFunctionMethod · 0.95
testGetSupplierMethod · 0.95
testApplyMethod · 0.95
asBiFunctionMethod · 0.95
asFunctionMethod · 0.95

Calls 2

getMethod · 0.95
applyMethod · 0.65

Tested by 4

testApplyBiFunctionMethod · 0.76
testApplyFunctionMethod · 0.76
testGetSupplierMethod · 0.76
testApplyMethod · 0.76