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

Method apply

src/main/java/org/apache/commons/lang3/tuple/Pair.java:140–142  ·  view source on GitHub ↗

Applies this key and value as arguments to the given function. @param The function return type. @param The kind of thrown exception or error. @param function the consumer to call. @return the function's return value. @throws E Thrown when the consumer fails. @since 3.13.0

(final FailableBiFunction<L, R, V, E> function)

Source from the content-addressed store, hash-verified

138 * @since 3.13.0
139 */
140 public <V, E extends Throwable> V apply(final FailableBiFunction<L, R, V, E> function) throws E {
141 return function.apply(getKey(), getValue());
142 }
143
144 /**
145 * Compares the pair based on the left element followed by the right element.

Callers

nothing calls this directly

Calls 3

getKeyMethod · 0.95
getValueMethod · 0.95
applyMethod · 0.65

Tested by

no test coverage detected