Commit | Line | Data |
---|---|---|
6151d86c | 1 | /******************************************************************************* |
c8422608 | 2 | * Copyright (c) 2010, 2013 Ericsson |
6151d86c PT |
3 | * |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Patrick Tasse - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom; | |
14 | ||
6151d86c | 15 | import org.eclipse.linuxtools.tmf.core.trace.TmfContext; |
a3db8436 | 16 | import org.eclipse.linuxtools.tmf.core.trace.location.ITmfLocation; |
6151d86c | 17 | |
a0a88f65 AM |
18 | /** |
19 | * Trace context for custom XML traces. | |
20 | * | |
21 | * @author Patrick Tassé | |
22 | */ | |
6151d86c PT |
23 | public class CustomXmlTraceContext extends TmfContext { |
24 | ||
a0a88f65 AM |
25 | /** |
26 | * Constructor | |
27 | * | |
28 | * @param location | |
29 | * The location (in the file) of this context | |
30 | * @param rank | |
31 | * The rank of the event pointed by this context | |
32 | */ | |
6151d86c PT |
33 | public CustomXmlTraceContext(ITmfLocation location, long rank) { |
34 | super(location, rank); | |
35 | } | |
36 | ||
6151d86c PT |
37 | @Override |
38 | public int hashCode() { | |
39 | return super.hashCode(); | |
40 | } | |
41 | ||
6151d86c PT |
42 | @Override |
43 | public boolean equals(Object obj) { | |
44 | if (this == obj) { | |
45 | return true; | |
46 | } | |
47 | if (!super.equals(obj)) { | |
48 | return false; | |
49 | } | |
50 | if (!(obj instanceof CustomXmlTraceContext)) { | |
51 | return false; | |
52 | } | |
53 | return true; | |
54 | } | |
55 | ||
c3c5c786 | 56 | } |