From 922b8dbba9f3299f6919eedd24ef7c7c85f1b116 Mon Sep 17 00:00:00 2001 From: Tyler Wilcock Date: Fri, 14 Sep 2018 09:23:19 -0500 Subject: [PATCH] Override toString() to provide useful info instead of hashcode --- src/main/java/com/widen/tabitha/Header.java | 3 +++ src/main/java/com/widen/tabitha/Row.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/widen/tabitha/Header.java b/src/main/java/com/widen/tabitha/Header.java index f5aa11a..61ad73e 100644 --- a/src/main/java/com/widen/tabitha/Header.java +++ b/src/main/java/com/widen/tabitha/Header.java @@ -180,4 +180,7 @@ public DuplicateColumnException(String column) { super("The column '" + column + "' already exists."); } } + + @Override + public String toString() { return columnsByIndex.toString(); } } diff --git a/src/main/java/com/widen/tabitha/Row.java b/src/main/java/com/widen/tabitha/Row.java index 2c22106..08ca11b 100644 --- a/src/main/java/com/widen/tabitha/Row.java +++ b/src/main/java/com/widen/tabitha/Row.java @@ -276,4 +276,7 @@ private Modifier(Header header, Variant[] cells) { this.cells = cells; } } + + @Override + public String toString() { return Arrays.toString(cells); } }