From 7ebd29d486b769eda5e65ba9cf5e3086587a9186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Alcarraz?= Date: Wed, 8 Nov 2023 18:17:41 -0500 Subject: [PATCH] dump overloads with default implementations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To make it easier to just dump to System.out or without indentation. Signed-off-by: Andrés Alcarraz --- jpos/src/main/java/org/jpos/util/Loggeable.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jpos/src/main/java/org/jpos/util/Loggeable.java b/jpos/src/main/java/org/jpos/util/Loggeable.java index 8fff25669e..9d9a5f8d92 100644 --- a/jpos/src/main/java/org/jpos/util/Loggeable.java +++ b/jpos/src/main/java/org/jpos/util/Loggeable.java @@ -26,5 +26,17 @@ */ public interface Loggeable { void dump(PrintStream p, String indent); + + default void dump() { + dump(""); + } + + default void dump(PrintStream p) { + dump(p, ""); + } + + default void dump(String indent) { + dump(System.out, indent); + } }