1 /*******************************************************************************
2 * Copyright (c) 2009, 2013 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 * Francois Chouinard - Updated as per TMF Trace Model 1.0
12 * Patrick Tasse - Updated for ranks in experiment location
13 *******************************************************************************/
15 package org
.eclipse
.linuxtools
.internal
.tmf
.core
.trace
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfLocation
;
21 * The experiment location in TMF.
23 * An experiment location is actually the set of locations of the traces it
24 * contains. By setting the individual traces to their corresponding locations,
25 * the experiment can be positioned to read the next chronological event.
27 * It is the responsibility of the user the individual trace locations are valid
28 * and that they are matched to the correct trace.
31 * @author Francois Chouinard
33 * @see TmfLocationArray
35 public final class TmfExperimentLocation
implements ITmfLocation
{
37 private final TmfLocationArray fLocation
;
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
44 * The standard constructor
46 * @param locations the set of trace locations
48 public TmfExperimentLocation(TmfLocationArray locations
) {
49 fLocation
= locations
;
53 * The copy constructor
55 * @param location the other experiment location
57 public TmfExperimentLocation(TmfExperimentLocation location
) {
58 this(location
.getLocationInfo());
61 // ------------------------------------------------------------------------
63 // ------------------------------------------------------------------------
66 * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#toString()
69 @SuppressWarnings("nls")
70 public String
toString() {
71 StringBuilder result
= new StringBuilder("TmfExperimentLocation [");
72 result
.append(fLocation
.toString());
74 return result
.toString();
78 * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#hashCode()
81 public int hashCode() {
82 return super.hashCode();
86 * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#equals(java.lang.Object)
89 public boolean equals(Object obj
) {
93 if (!super.equals(obj
)) {
96 if (getClass() != obj
.getClass()) {
103 * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationData()
106 public TmfLocationArray
getLocationInfo() {