tmf/ctf: Make CtfLocationInfo inline with code style
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 13 Mar 2014 21:45:38 +0000 (17:45 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 14 Mar 2014 14:57:03 +0000 (10:57 -0400)
Change-Id: I40b698178df4a01b68a0575a9fee6f1371879a64
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23357
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocationInfo.java

index cb974929af3cb0ff8c265ad899b473777223db2f..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,7 +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.028214 seconds and 5 git commands to generate.