1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.experiment
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.TmfLocation
;
18 * <b><u>TmfExperimentLocation</u></b>
20 * The experiment location is the set of its traces' locations.
22 public class TmfExperimentLocation
extends TmfLocation
<TmfLocationArray
> {
24 private long[] fRanks
;
26 public TmfExperimentLocation(TmfLocationArray locations
, long[] ranks
) {
32 public TmfExperimentLocation
clone() {
33 super.clone(); // To keep FindBugs happy
34 TmfLocationArray array
= (TmfLocationArray
) getLocation();
35 TmfLocationArray clones
= array
.clone();
36 return new TmfExperimentLocation(clones
, fRanks
.clone());
40 @SuppressWarnings("nls")
41 public String
toString() {
42 StringBuilder result
= new StringBuilder("[TmfExperimentLocation");
43 TmfLocationArray array
= (TmfLocationArray
) getLocation();
44 for (int i
= 0; i
< array
.locations
.length
; i
++) {
45 result
.append("[" + array
.locations
[i
].toString() + "," + fRanks
[i
] + "]");
48 return result
.toString();
51 public long[] getRanks() {