Rename xxx.lttng to xxx.lttng.core
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / experiment / TmfExperimentCheckpoint.java
index 5d52e65799810fb74f92218c28e5a4dca1d652cf..d7257f6833a559db2f418ee616c54f7f3da560d6 100644 (file)
@@ -13,7 +13,7 @@
 package org.eclipse.linuxtools.tmf.experiment;
 
 import org.eclipse.linuxtools.tmf.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
+import org.eclipse.linuxtools.tmf.trace.TmfContext;
 
 /**
  * <b><u>TmfExperimentCheckpoint</u></b>
@@ -27,7 +27,7 @@ public class TmfExperimentCheckpoint implements Comparable<TmfExperimentCheckpoi
     // ------------------------------------------------------------------------
     
     private final TmfTimestamp fTimestamp;
-    private final TmfTraceContext[] fContexts;
+    private final TmfContext[] fContexts;
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -37,7 +37,7 @@ public class TmfExperimentCheckpoint implements Comparable<TmfExperimentCheckpoi
      * @param ts
      * @param location
      */
-    public TmfExperimentCheckpoint(TmfTimestamp ts, TmfTraceContext[] contexts) {
+    public TmfExperimentCheckpoint(TmfTimestamp ts, TmfContext[] contexts) {
         fTimestamp = ts;
         fContexts = contexts;
     }
@@ -56,14 +56,35 @@ public class TmfExperimentCheckpoint implements Comparable<TmfExperimentCheckpoi
     /**
      * @return the checkpoint event stream location
      */
-    public TmfTraceContext[] getContexts() {
+    public TmfContext[] getContexts() {
         return fContexts;
     }
 
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    @Override
+    public int hashCode() {
+       int result = 37;
+       result = 17 * result + fTimestamp.hashCode();
+       return result;
+    }
+    @Override
+    public boolean equals(Object other) {
+       if (!(other instanceof TmfExperimentCheckpoint)) {
+               return false;
+       }
+       TmfExperimentCheckpoint o = (TmfExperimentCheckpoint) other;
+       return fTimestamp.equals(o.fTimestamp);
+    }
     // ------------------------------------------------------------------------
     // Comparable
     // ------------------------------------------------------------------------
 
+       @Override
        public int compareTo(TmfExperimentCheckpoint other) {
                return fTimestamp.compareTo(other.fTimestamp, false);
        }
This page took 0.024441 seconds and 5 git commands to generate.