commit | e676dabe617d834da43ca13c2b1ba1e96c89bbba | [log] [tgz] |
---|---|---|
author | David K. Bainbridge <dbainbri@ciena.com> | Fri Oct 23 16:13:07 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Mon Oct 26 18:25:23 2015 +0000 |
tree | 8429b616b9a453ea45d13122265a1cb559af7b05 | |
parent | 531fcf521ece87fce39ede276b8f0d24d9c21f9c [diff] [blame] |
added equality functions that do a deep content check Change-Id: Ibc64373587622fa6911d18e21d1695577cc36301
diff --git a/core/api/src/main/java/org/onosproject/cluster/NodeId.java b/core/api/src/main/java/org/onosproject/cluster/NodeId.java index 68b490f..6cfb42c 100644 --- a/core/api/src/main/java/org/onosproject/cluster/NodeId.java +++ b/core/api/src/main/java/org/onosproject/cluster/NodeId.java
@@ -20,7 +20,7 @@ /** * Controller cluster identity. */ -public class NodeId { +public class NodeId implements Comparable<NodeId> { private final String id; @@ -55,4 +55,9 @@ return id; } + @Override + public int compareTo(NodeId that) { + return this.id.compareTo(that.id); + } + }