ctf/tmf: allow multiple traces to be open with name clashing events
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfLocationInfo.java
index 7a3c4678159f4809cb523253fb9607fa9c05f594..0e9d59aa1ae9e2568e9289f2446f18a61175f9c3 100644 (file)
@@ -20,8 +20,8 @@ import java.nio.ByteBuffer;
  */
 public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
 
-    private final long timestamp;
-    private final long index;
+    private final long fTimestamp;
+    private final long fIndex;
 
     /**
      * @param ts
@@ -31,8 +31,8 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
      *            timestamp, which one is it.)
      */
     public CtfLocationInfo(long ts, long index) {
-        this.timestamp = ts;
-        this.index = index;
+        fTimestamp = ts;
+        fIndex = index;
     }
 
     /**
@@ -44,22 +44,22 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
      * @since 3.0
      */
     public CtfLocationInfo(ByteBuffer bufferIn) {
-        timestamp = bufferIn.getLong();
-        index = bufferIn.getLong();
+        fTimestamp = bufferIn.getLong();
+        fIndex = bufferIn.getLong();
     }
 
     /**
      * @return The timestamp
      */
     public long getTimestamp() {
-        return timestamp;
+        return fTimestamp;
     }
 
     /**
      * @return The index of the element
      */
     public long getIndex() {
-        return index;
+        return fIndex;
     }
 
     // ------------------------------------------------------------------------
@@ -70,8 +70,8 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = (prime * result) + (int) (index ^ (index >>> 32));
-        result = (prime * result) + (int) (timestamp ^ (timestamp >>> 32));
+        result = (prime * result) + (int) (fIndex ^ (fIndex >>> 32));
+        result = (prime * result) + (int) (fTimestamp ^ (fTimestamp >>> 32));
         return result;
     }
 
@@ -87,10 +87,10 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
             return false;
         }
         CtfLocationInfo other = (CtfLocationInfo) obj;
-        if (index != other.index) {
+        if (fIndex != other.fIndex) {
             return false;
         }
-        if (timestamp != other.timestamp) {
+        if (fTimestamp != other.fTimestamp) {
             return false;
         }
         return true;
@@ -98,7 +98,7 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
 
     @Override
     public String toString() {
-        return "Element [" + timestamp + '/' + index + ']'; //$NON-NLS-1$
+        return "Element [" + fTimestamp + '/' + fIndex + ']'; //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
@@ -107,16 +107,16 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
 
     @Override
     public int compareTo(CtfLocationInfo other) {
-        if (this.timestamp > other.getTimestamp()) {
+        if (fTimestamp > other.getTimestamp()) {
             return 1;
         }
-        if (this.timestamp < other.getTimestamp()) {
+        if (fTimestamp < other.getTimestamp()) {
             return -1;
         }
-        if (this.index > other.getIndex()) {
+        if (fIndex > other.getIndex()) {
             return 1;
         }
-        if (this.index < other.getIndex()) {
+        if (fIndex < other.getIndex()) {
             return -1;
         }
         return 0;
@@ -131,8 +131,7 @@ public class CtfLocationInfo implements Comparable<CtfLocationInfo> {
      * @since 3.0
      */
     public void serialize(ByteBuffer bufferOut) {
-        bufferOut.putLong(timestamp);
-        bufferOut.putLong(index);
-
+        bufferOut.putLong(fTimestamp);
+        bufferOut.putLong(fIndex);
     }
 }
This page took 0.026551 seconds and 5 git commands to generate.