From b5c11f5cfcabd388269424023c5e9ffd1c315315 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 9 Mar 2009 15:35:05 +0100 Subject: [PATCH] Override toString() to output sensible information. --- src/net/pterodactylus/arachne/core/Edition.java | 14 ++++++++++++++ src/net/pterodactylus/arachne/core/Page.java | 14 ++++++++++++++ src/net/pterodactylus/arachne/core/Site.java | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/net/pterodactylus/arachne/core/Edition.java b/src/net/pterodactylus/arachne/core/Edition.java index 5fbc41f..547c83c 100644 --- a/src/net/pterodactylus/arachne/core/Edition.java +++ b/src/net/pterodactylus/arachne/core/Edition.java @@ -51,4 +51,18 @@ public class Edition { return edition; } + // + // OBJECT METHODS + // + + /** + * {@inheritdoc} + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return getClass().getName() + "[site=" + site + ",edition=" + edition + "]"; + } + } diff --git a/src/net/pterodactylus/arachne/core/Page.java b/src/net/pterodactylus/arachne/core/Page.java index a833fab..2a87224 100644 --- a/src/net/pterodactylus/arachne/core/Page.java +++ b/src/net/pterodactylus/arachne/core/Page.java @@ -48,4 +48,18 @@ public class Page { return path; } + // + // OBJECT METHODS + // + + /** + * {@inheritdoc} + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return getClass().getName() + "[edition=" + edition + ",path=" + path + "]"; + } + } diff --git a/src/net/pterodactylus/arachne/core/Site.java b/src/net/pterodactylus/arachne/core/Site.java index 86f1fe1..699b38f 100644 --- a/src/net/pterodactylus/arachne/core/Site.java +++ b/src/net/pterodactylus/arachne/core/Site.java @@ -51,4 +51,18 @@ public class Site { return basename; } + // + // OBJECT METHODS + // + + /** + * {@inheritdoc} + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return getClass().getName() + "[key=" + key + ",basename=" + basename + "]"; + } + } -- 2.7.4