refactored Topology to make it a value (immutable) class
[sbp.git] / src / edu / berkeley / sbp / util / TopologicalBag.java
index 2a1bb53..8862be6 100644 (file)
@@ -31,7 +31,7 @@ public class TopologicalBag<K,V> implements MapBag<Topology<K>,V> {
     public void put(Topology<K> t, V v) {
         for(Topology<K> ht : h.keySet()) {
             if (t.disjoint(ht)) continue;
-            if (t.equals(ht)) {
+            if (t.containsAll(ht) && ht.containsAll(t)) {
                 h.get(ht).add(v);
                 return;
             }