Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r195480580
--- Diff: src/java/org/apache/cassandra/locator/Replicas.java ---
@@ -50,6 +50,30 @@
public abstract int size();
protected abstract Collection<Replica> getUnmodifiableCollection();
+
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (!(o instanceof Replicas))
+ return false;
+
+ Replicas that = (Replicas) o;
+ if (this.size() != that.size())
+ return false;
+ return Iterables.elementsEqual(this, that);
+ }
+
+
+ public int hashCode()
+ {
+ int result = 17;
--- End diff --
Result starts as 17? I don't recall seeing that being done normally.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]