}
/**
+ * {@inheritDoc} Two Node objects are considered equal if their hostnames
+ * and their port numbers are equal.
+ */
+ @Override
+ public boolean equals(Object object) {
+ if ((object == null) || !(object instanceof Node)) {
+ return false;
+ }
+ Node node = (Node) object;
+ return hostname.equals(node.hostname) && port == node.port;
+ }
+
+ /**
* {@inheritDoc}
*/
@Override