Implement BugCollection.hashCode()
[cfb.git] / prod / net / jaekl / cfb / xml / BugCollection.java
index 98ea93b422446de826716cbcce8f0da8511a3518..168c8f1c5787935a5c6badab052d291c2d1e74b0 100644 (file)
@@ -5,6 +5,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import net.jaekl.cfb.util.Util;
 import net.jaekl.qd.xml.ParseResult;
 import net.jaekl.qd.xml.XmlParseException;
 
@@ -52,4 +53,21 @@ public class BugCollection extends ParseResult {
                }
        }
 
+       @Override
+       public boolean equals(Object obj) {
+               if (null == obj) {
+                       return false;
+               }
+               if (! (obj instanceof BugCollection)) {
+                       return false;
+               }
+               BugCollection other = (BugCollection)obj;
+               
+               return Util.listsAreEqual(this.m_bugs, other.m_bugs);
+       }
+       
+       @Override
+       public int hashCode() {
+               return Util.objHashCode(m_bugs);
+       }
 }