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 566758c0add12adfba971a70d741db4d3c7a7f15..5c7b5b3fe9a3c9077915263e6edb5b166d213f81 100644 (file)
@@ -1,20 +1,21 @@
 /*******************************************************************************
- * 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
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * 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.
@@ -25,13 +26,15 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
  * <p>
  * It is the responsibility of the user the individual trace locations are valid
  * and that they are matched to the correct trace.
- * 
+ *
  * @version 1.0
  * @author Francois Chouinard
- * 
+ *
  * @see TmfLocationArray
  */
-public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> implements Cloneable {
+public final class TmfExperimentLocation implements ITmfLocation {
+
+    private final TmfLocationArray fLocation;
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -39,67 +42,40 @@ public class TmfExperimentLocation extends TmfLocation<TmfLocationArray> impleme
 
     /**
      * The standard constructor
-     * 
+     *
      * @param locations the set of trace locations
      */
     public TmfExperimentLocation(TmfLocationArray locations) {
-        super(locations);
+        fLocation = locations;
     }
 
     /**
      * The copy constructor
-     * 
+     *
      * @param location the other experiment location
      */
     public TmfExperimentLocation(TmfExperimentLocation location) {
-        this(location.getLocation());
-    }
-
-    // ------------------------------------------------------------------------
-    // Cloneable
-    // ------------------------------------------------------------------------
-
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#clone()
-     */
-    @Override
-    public TmfExperimentLocation clone() {
-//        super.clone(); // To keep FindBugs happy
-        TmfLocationArray array = (TmfLocationArray) getLocation();
-        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 = ((TmfLocationArray) getLocation()).getLocations();
-        for (ITmfLocation<?> location : locations) {
-            result.append("[" + location.toString() + "]");
-        }
+        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> impleme
         return true;
     }
 
+    @Override
+    public TmfLocationArray getLocationInfo() {
+        return fLocation;
+    }
+
 }
This page took 0.025672 seconds and 5 git commands to generate.