Improve test cases. Coverage of 85%+ and fix bugs.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / internal / ctf / core / trace / StreamInput.java
index 7116c1be912f45292cc5fde2dd8482dacdd80173..92b2945eb015e1cf149b780b87cec85cee6836e7 100644 (file)
@@ -362,4 +362,40 @@ public class StreamInput implements IDefinitionScope {
         index.getEntries().get(0).setIndexBegin(0L);
     }
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = (prime * result) + ((file == null) ? 0 : file.hashCode());
+        return result;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (!(obj instanceof StreamInput)) {
+            return false;
+        }
+        StreamInput other = (StreamInput) obj;
+        if (file == null) {
+            if (other.file != null) {
+                return false;
+            }
+        } else if (!file.equals(other.file)) {
+            return false;
+        }
+        return true;
+    }
+
 }
This page took 0.023833 seconds and 5 git commands to generate.