X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fcore%2FNode.java;h=468a256d0b0c08808dd56497a121046115fbe434;hb=010e39aacf7769db05545c166edb222d212a3dae;hp=e0d61f7a9adedf273fc384e6dd82eb9e1fd62519;hpb=3189829661d3411ba3f79b1199ee5fab5c75aae5;p=jSite2.git
diff --git a/src/net/pterodactylus/jsite/core/Node.java b/src/net/pterodactylus/jsite/core/Node.java
index e0d61f7..468a256 100644
--- a/src/net/pterodactylus/jsite/core/Node.java
+++ b/src/net/pterodactylus/jsite/core/Node.java
@@ -21,7 +21,7 @@ package net.pterodactylus.jsite.core;
/**
* Container for a Freenet node.
- *
+ *
* @author David âBombeâ Roden <bombe@freenetproject.org>
* @version $Id$
*/
@@ -36,12 +36,9 @@ public class Node {
/** The port number of the node. */
private int port;
- /** Whether the node is running on the same machine as jSite. */
- private boolean sameMachine;
-
/**
* Returns the user-given name of the node.
- *
+ *
* @return The name of the node
*/
public String getName() {
@@ -50,7 +47,7 @@ public class Node {
/**
* Sets the user-given name of the node.
- *
+ *
* @param name
* The name of the node
*/
@@ -60,7 +57,7 @@ public class Node {
/**
* Returns the hostname of the node.
- *
+ *
* @return The hostname of the node
*/
public String getHostname() {
@@ -69,7 +66,7 @@ public class Node {
/**
* Sets the hostname of the node.
- *
+ *
* @param hostname
* The hostname of the node
*/
@@ -79,7 +76,7 @@ public class Node {
/**
* Returns the port number of the node.
- *
+ *
* @return The port number of the node
*/
public int getPort() {
@@ -88,7 +85,7 @@ public class Node {
/**
* Sets the port number of the node.
- *
+ *
* @param port
* The port number of the node
*/
@@ -97,24 +94,11 @@ public class Node {
}
/**
- * Returns whether this node is running on the same machine as jSite.
- *
- * @return the sameMachine true
if, and only if, the node is
- * running on the same machine as jSite
- */
- boolean isSameMachine() {
- return sameMachine;
- }
-
- /**
- * Sets whether this node is running on the same machine as jSite.
- *
- * @param sameMachine
- * true
if the node is running on the same machine
- * as jSite, false
otherwise
+ * {@inheritDoc}
*/
- void setSameMachine(boolean sameMachine) {
- this.sameMachine = sameMachine;
+ @Override
+ public String toString() {
+ return name + " (" + hostname + ((port == 9481) ? ("") : (":" + port)) + ")";
}
}