Commit | Line | Data |
---|---|---|
6151d86c | 1 | /******************************************************************************* |
60ae41e1 | 2 | * Copyright (c) 2010, 2014 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 | ||
47aafe74 | 13 | package org.eclipse.linuxtools.tmf.core.parsers.custom; |
6151d86c | 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é | |
47aafe74 | 22 | * @since 3.0 |
a0a88f65 | 23 | */ |
6151d86c PT |
24 | public class CustomXmlTraceContext extends TmfContext { |
25 | ||
a0a88f65 AM |
26 | /** |
27 | * Constructor | |
28 | * | |
29 | * @param location | |
30 | * The location (in the file) of this context | |
31 | * @param rank | |
32 | * The rank of the event pointed by this context | |
33 | */ | |
6151d86c PT |
34 | public CustomXmlTraceContext(ITmfLocation location, long rank) { |
35 | super(location, rank); | |
36 | } | |
37 | ||
6151d86c PT |
38 | @Override |
39 | public int hashCode() { | |
40 | return super.hashCode(); | |
41 | } | |
42 | ||
6151d86c PT |
43 | @Override |
44 | public boolean equals(Object obj) { | |
45 | if (this == obj) { | |
46 | return true; | |
47 | } | |
48 | if (!super.equals(obj)) { | |
49 | return false; | |
50 | } | |
51 | if (!(obj instanceof CustomXmlTraceContext)) { | |
52 | return false; | |
53 | } | |
54 | return true; | |
55 | } | |
56 | ||
c3c5c786 | 57 | } |