From: Matthew Khouzam Date: Thu, 13 Mar 2014 21:45:38 +0000 (-0400) Subject: tmf/ctf: Make CtfLocationInfo inline with code style X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=b1443279a07d37a0e2f14d78fbb8a57e77ee0322;p=deliverable%2Ftracecompass.git tmf/ctf: Make CtfLocationInfo inline with code style Change-Id: I40b698178df4a01b68a0575a9fee6f1371879a64 Signed-off-by: Matthew Khouzam Reviewed-on: https://git.eclipse.org/r/23357 Tested-by: Hudson CI Reviewed-by: Marc-Andre Laperle IP-Clean: Marc-Andre Laperle Tested-by: Marc-Andre Laperle --- diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocationInfo.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocationInfo.java index cb974929af..0e9d59aa1a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocationInfo.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocationInfo.java @@ -20,8 +20,8 @@ import java.nio.ByteBuffer; */ public class CtfLocationInfo implements Comparable { - 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 { * 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 { * @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 { 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 { 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 { @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 { @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 { * @since 3.0 */ public void serialize(ByteBuffer bufferOut) { - bufferOut.putLong(timestamp); - bufferOut.putLong(index); + bufferOut.putLong(fTimestamp); + bufferOut.putLong(fIndex); } }