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

Method accept

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

Consumes a consumer and rethrows any exception as a RuntimeException. @param consumer the consumer to consume @param object1 the first object to consume by consumer @param object2 the second object to consume by consumer @param the type of the first argument the consume

(final FailableBiConsumer<O1, O2, T> consumer,
        final O1 object1, final O2 object2)

Source from the content-addressed store, hash-verified

294 * @param <T> The type of checked exception the consumer may throw
295 */
296 public static <O1, O2, T extends Throwable> void accept(final FailableBiConsumer<O1, O2, T> consumer,
297 final O1 object1, final O2 object2) {
298 run(() -> consumer.accept(object1, object2));
299 }
300
301 /**
302 * Consumes a consumer and rethrows any exception as a {@link RuntimeException}.

Callers 11

testAcceptBiConsumerMethod · 0.95
testAcceptConsumerMethod · 0.95
testAcceptIntConsumerMethod · 0.95
testAsConsumerMethod · 0.95
asBiConsumerMethod · 0.95
asConsumerMethod · 0.95

Calls 2

runMethod · 0.95
acceptMethod · 0.65

Tested by 9

testAcceptBiConsumerMethod · 0.76
testAcceptConsumerMethod · 0.76
testAcceptIntConsumerMethod · 0.76
testAsConsumerMethod · 0.76