From 84298b08b329cb9e1f3c98fcd0dddfc944e33891 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Fri, 25 Aug 2023 17:09:21 +0200 Subject: [PATCH] Added TriConsumerException --- .../fr/pandacube/lib/util/ThrowableUtil.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pandalib-util/src/main/java/fr/pandacube/lib/util/ThrowableUtil.java b/pandalib-util/src/main/java/fr/pandacube/lib/util/ThrowableUtil.java index a868d10..293a1d6 100644 --- a/pandalib-util/src/main/java/fr/pandacube/lib/util/ThrowableUtil.java +++ b/pandalib-util/src/main/java/fr/pandacube/lib/util/ThrowableUtil.java @@ -225,5 +225,21 @@ public class ThrowableUtil { */ void accept(T t, U u) throws E; } + + + + /** + * A consumer that can possibly throw a checked exception. + */ + public interface TriConsumerException { + /** + * Run the consumer on the specified parameters. + * @param t the first parameter of the consumer. + * @param u the second parameter of the consumer. + * @param v the tird parameter of the consumer. + * @throws E if the function fails. + */ + void accept(T t, U u, V v) throws E; + } }