X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.core%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcore%2Fctfadaptor%2FCtfLocation.java;h=7ca9fb0ac9be811eee957c875cb776517a5c12a6;hb=9a47bdf1564b806956fc15ae4a5e3790f8a0d4be;hp=f218d3ff538e15ec661399a89d3a86760a1db388;hpb=af6b0b00e4a8ecfcb3b926a8dcf724b369d3b59f;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocation.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocation.java index f218d3ff53..7ca9fb0ac9 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocation.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfLocation.java @@ -21,7 +21,7 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation; * @version 1.0 * @author Matthew Khouzam */ -public class CtfLocation implements ITmfLocation, Cloneable { +public class CtfLocation implements ITmfLocation, Cloneable { private CtfLocationData fLocation; @@ -31,14 +31,13 @@ public class CtfLocation implements ITmfLocation, Cloneable { public static final CtfLocationData INVALID_LOCATION = new CtfLocationData(-1, -1); /** - * Copy constructor + * Constructor for CtfLocation. Uses a default index of 0. * - * @param location - * Other location to copy - * @since 2.0 + * @param timestamp + * The timestamp of this location */ - public CtfLocation(CtfLocationData location) { - setLocation(location); + public CtfLocation(ITmfTimestamp timestamp) { + setLocation(new CtfLocationData(timestamp.getValue(), 0)); } /** @@ -55,14 +54,14 @@ public class CtfLocation implements ITmfLocation, Cloneable { } /** - * Constructor for CtfLocation. Uses a default index of 0. + * Copy constructor * - * @param timestamp - * The timestamp of this location + * @param location + * Other location to copy + * @since 2.0 */ - @Deprecated - public CtfLocation(ITmfTimestamp timestamp) { - setLocation(new CtfLocationData(timestamp.getValue(), 0)); + public CtfLocation(CtfLocationData location) { + setLocation(location); } /** @@ -94,11 +93,11 @@ public class CtfLocation implements ITmfLocation, Cloneable { * Get the Location Data of this location * * @return The CtfLocationData - * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocation() + * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationInfo() * @since 2.0 */ @Override - public CtfLocationData getLocation() { + public CtfLocationData getLocationInfo() { return fLocation; } @@ -150,10 +149,10 @@ public class CtfLocation implements ITmfLocation, Cloneable { */ @Override public String toString() { - if( this.getLocation().equals(CtfLocation.INVALID_LOCATION )) { + if( this.getLocationInfo().equals(CtfLocation.INVALID_LOCATION )) { return "CtfLocation: INVALID"; //$NON-NLS-1$ } - return "CtfLocation: " + getLocation().toString(); //$NON-NLS-1$ + return "CtfLocation: " + getLocationInfo().toString(); //$NON-NLS-1$ }