Implement toString().
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 31 Aug 2012 08:46:26 +0000 (10:46 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 31 Aug 2012 08:46:26 +0000 (10:46 +0200)
src/main/java/de/todesbaum/util/freenet/fcp2/Node.java

index d2fa91c..71c2a6e 100644 (file)
@@ -78,4 +78,16 @@ public class Node {
                return port;
        }
 
+       //
+       // OBJECT METHODS
+       //
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public String toString() {
+               return String.format("%s[hostname=%s,port=%d]", getClass().getName(), getHostname(), getPort());
+       }
+
 }