package org.eclipse.linuxtools.tmf.experiment;
import org.eclipse.linuxtools.tmf.trace.ITmfLocation;
+import org.eclipse.linuxtools.tmf.trace.TmfLocation;
/**
* <b><u>TmfExperimentLocation</u></b>
* <p>
* The experiment location is the set of its traces' locations.
*/
-public class TmfExperimentLocation implements ITmfLocation {
+public class TmfExperimentLocation extends TmfLocation<ITmfLocation<?>[]> {
- private ITmfLocation[] fLocations;
-
- public TmfExperimentLocation(ITmfLocation[] locations) {
- fLocations = locations;
- }
-
- public ITmfLocation[] getLocations() {
- return fLocations;
+ public TmfExperimentLocation(ITmfLocation<?>[] locations) {
+ super(locations);
}
@Override
public TmfExperimentLocation clone() {
- ITmfLocation[] locations = new ITmfLocation[fLocations.length];
- for (int i = 0; i < fLocations.length; i++) {
- locations[i] = fLocations[i].clone();
+ ITmfLocation<?>[] locations = (ITmfLocation<?>[]) getLocation();
+ ITmfLocation<?>[] clones = new ITmfLocation[locations.length];
+ for (int i = 0; i < locations.length; i++) {
+ clones[i] = locations[i].clone();
}
- return new TmfExperimentLocation(locations);
+ return new TmfExperimentLocation(clones);
}
}