Skip to content

Commit

Permalink
dump overloads with default implementations
Browse files Browse the repository at this point in the history
To make it easier to just dump to System.out or without indentation.

Signed-off-by: Andrés Alcarraz <alcarraz@gmail.com>
  • Loading branch information
alcarraz committed Nov 8, 2023
1 parent f047169 commit 7ebd29d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions jpos/src/main/java/org/jpos/util/Loggeable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 7ebd29d

Please sign in to comment.