Remove the generic location (replace by Comparable)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfTmfTrace.java
index 8c82e9b3d069253f782b6ea26d61cb5ce015c8f8..b6d564ca8c6c98db5850b42aa34a19126353ab90 100644 (file)
@@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
  * @version 1.0
  * @author Matthew khouzam
  */
-public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
+public class CtfTmfTrace extends TmfTrace implements ITmfEventParser {
 
 
     //-------------------------------------------
@@ -155,19 +155,19 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
      * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getCurrentLocation()
      */
     @Override
-    public ITmfLocation<?> getCurrentLocation() {
+    public ITmfLocation getCurrentLocation() {
         return null;
     }
 
 
 
     @Override
-    public double getLocationRatio(ITmfLocation<?> location) {
+    public double getLocationRatio(ITmfLocation location) {
         final CtfLocation curLocation = (CtfLocation) location;
         final CtfTmfLightweightContext context = new CtfTmfLightweightContext(this);
         context.setLocation(curLocation);
-        context.seek(curLocation.getLocation());
-        final CtfLocationData currentTime = ((CtfLocationData)context.getLocation().getLocation());
+        context.seek(curLocation.getLocationData());
+        final CtfLocationData currentTime = ((CtfLocationData)context.getLocation().getLocationData());
         final long startTime = getIterator(this, context).getStartTime();
         final long endTime = getIterator(this, context).getEndTime();
         return ((double) currentTime.getTimestamp() - startTime)
@@ -197,7 +197,7 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
      * @return ITmfContext
      */
     @Override
-    public ITmfContext seekEvent(final ITmfLocation<?> location) {
+    public ITmfContext seekEvent(final ITmfLocation location) {
         CtfLocation currentLocation = (CtfLocation) location;
         CtfTmfLightweightContext context = new CtfTmfLightweightContext(this);
         /*
@@ -209,7 +209,7 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
             currentLocation = new CtfLocation(new CtfLocationData(0L, 0L));
             context.setRank(0);
         }
-        if (currentLocation.getLocation() == CtfLocation.INVALID_LOCATION) {
+        if (currentLocation.getLocationData() == CtfLocation.INVALID_LOCATION) {
             ((CtfTmfTimestamp) getEndTime()).setType(TimestampType.NANOS);
             currentLocation.setLocation(getEndTime().getValue() + 1, 0L);
         }
@@ -249,7 +249,7 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{
     public synchronized CtfTmfEvent getNext(final ITmfContext context) {
         CtfTmfEvent event = null;
         if (context instanceof CtfTmfLightweightContext) {
-            if (CtfLocation.INVALID_LOCATION.equals(context.getLocation().getLocation())) {
+            if (CtfLocation.INVALID_LOCATION.equals(context.getLocation().getLocationData())) {
                 return null;
             }
             CtfTmfLightweightContext ctfContext = (CtfTmfLightweightContext) context;
This page took 0.02641 seconds and 5 git commands to generate.