ctf: make StreamInputPacketIndexEntry not Comparable
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / internal / ctf / core / trace / StreamInputPacketIndexEntry.java
index 8d72d1a8498a05bba19ae8f02bf206f4ca84bcf4..97a477725bafd8056b1a8a3036955cb7aa64c808 100644 (file)
@@ -20,7 +20,7 @@ import java.util.Map;
  * <p>
  * Represents an entry in the index of event packets.
  */
-public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacketIndexEntry> {
+public class StreamInputPacketIndexEntry {
 
     // ------------------------------------------------------------------------
     // Attributes
@@ -64,7 +64,7 @@ public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacket
     /**
      * Which target is being traced
      */
-    private String fTarget ;
+    private String fTarget;
     private long fTargetID;
 
     /**
@@ -72,7 +72,6 @@ public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacket
      */
     private final Map<String, Object> fAttributes = new HashMap<>();
 
-
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -205,7 +204,8 @@ public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacket
     }
 
     /**
-     * @param lostEvents the lostEvents to set
+     * @param lostEvents
+     *            the lostEvents to set
      */
     public void setLostEvents(long lostEvents) {
         fLostEvents = lostEvents;
@@ -230,7 +230,7 @@ public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacket
      *            The name of the attribute
      * @return The value that was stored, or null if it wasn't found
      */
-    public Object lookupAttribute(String field){
+    public Object lookupAttribute(String field) {
         return fAttributes.get(field);
     }
 
@@ -255,24 +255,7 @@ public class StreamInputPacketIndexEntry implements Comparable<StreamInputPacket
     /**
      * @return The ID of the target
      */
-    public long getTargetId(){
+    public long getTargetId() {
         return fTargetID;
     }
-
-    @Override
-    public int compareTo(StreamInputPacketIndexEntry o) {
-        if (fTimestampBegin > o.fTimestampBegin) {
-            return 1;
-        }
-        if (fTimestampBegin < o.fTimestampBegin) {
-            return -1;
-        }
-        if (fTimestampEnd > o.fTimestampEnd) {
-            return 1;
-        }
-        if (fTimestampEnd < o.fTimestampEnd) {
-            return -1;
-        }
-        return 0;
-    }
 }
This page took 0.027953 seconds and 5 git commands to generate.