From: David ‘Bombe’ Roden Date: Mon, 9 Mar 2009 14:35:05 +0000 (+0100) Subject: Override toString() to output sensible information. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b5c11f5cfcabd388269424023c5e9ffd1c315315;p=arachne.git Override toString() to output sensible information. --- 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 + "]"; + } + }