01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.cluster;
06:
07: public class Node {
08: private final String nodeId;
09:
10: public Node(final String nodeId) {
11: this .nodeId = nodeId;
12: }
13:
14: public String getNodeId() {
15: return nodeId;
16: }
17:
18: public boolean equals(Object obj) {
19: if (!(obj instanceof Node))
20: return false;
21: Node that = (Node) obj;
22: return this .nodeId.equals(that.nodeId);
23: }
24:
25: public int hashCode() {
26: return nodeId.hashCode();
27: }
28:
29: public String toString() {
30: return nodeId;
31: }
32: }
|