tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / internal / tmf / core / trace / TmfExperimentLocation.java
index b61336dce4b0463f13862adf151493cd580840b3..5c7b5b3fe9a3c9077915263e6edb5b166d213f81 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -9,12 +9,13 @@
  * Contributors:
  * Francois Chouinard - Initial API and implementation
  * Francois Chouinard - Updated as per TMF Trace Model 1.0
+ * Patrick Tasse - Updated for ranks in experiment location
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.tmf.core.trace;
 
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
-import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
+
 
 /**
  * The experiment location in TMF.
@@ -31,7 +32,9 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
  *
  * @see TmfLocationArray
  */
-public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> {
+public final class TmfExperimentLocation implements ITmfLocation {
+
+    private final TmfLocationArray fLocation;
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -43,7 +46,7 @@ public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> {
      * @param locations the set of trace locations
      */
     public TmfExperimentLocation(TmfLocationArray locations) {
-        super(locations);
+        fLocation = locations;
     }
 
     /**
@@ -52,54 +55,27 @@ public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> {
      * @param location the other experiment location
      */
     public TmfExperimentLocation(TmfExperimentLocation location) {
-        this(location.getLocationData());
-    }
-
-    // ------------------------------------------------------------------------
-    // Cloneable
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#clone()
-     */
-    @Override
-    public TmfExperimentLocation clone() {
-//        super.clone(); // To keep FindBugs happy
-        TmfLocationArray array = getLocationData();
-        TmfLocationArray clones = array.clone();
-        return new TmfExperimentLocation(clones);
+        this(location.getLocationInfo());
     }
 
     // ------------------------------------------------------------------------
     // Object
     // ------------------------------------------------------------------------
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#toString()
-     */
     @Override
     @SuppressWarnings("nls")
     public String toString() {
-        StringBuilder result = new StringBuilder("[TmfExperimentLocation");
-        ITmfLocation<? extends Comparable<?>>[] locations = getLocationData().getLocations();
-        for (ITmfLocation<?> location : locations) {
-            result.append("[" + location + "]");
-        }
+        StringBuilder result = new StringBuilder("TmfExperimentLocation [");
+        result.append(fLocation.toString());
         result.append("]");
         return result.toString();
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#hashCode()
-     */
     @Override
     public int hashCode() {
         return super.hashCode();
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#equals(java.lang.Object)
-     */
     @Override
     public boolean equals(Object obj) {
         if (this == obj) {
@@ -114,4 +90,9 @@ public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> {
         return true;
     }
 
+    @Override
+    public TmfLocationArray getLocationInfo() {
+        return fLocation;
+    }
+
 }
This page took 0.024589 seconds and 5 git commands to generate.