1 /*******************************************************************************
2 * Copyright (c) 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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.tmf
.ui
.parsers
.custom
;
15 import java
.io
.IOException
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.io
.BufferedRandomAccessFile
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfLocation
;
19 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.TmfContext
;
21 public class CustomXmlTraceContext
extends TmfContext
{
22 public BufferedRandomAccessFile raFile
;
24 public CustomXmlTraceContext(ITmfLocation
<?
> location
, long rank
) {
25 super(location
, rank
);
29 public void dispose() {
33 } catch (IOException e
) {
40 * @see java.lang.Object#hashCode()
43 public int hashCode() {
45 int result
= super.hashCode();
46 result
= prime
* result
+ ((raFile
== null) ?
0 : raFile
.hashCode());
51 * @see java.lang.Object#equals(java.lang.Object)
54 public boolean equals(Object obj
) {
58 if (!super.equals(obj
)) {
61 if (!(obj
instanceof CustomXmlTraceContext
)) {
64 CustomXmlTraceContext other
= (CustomXmlTraceContext
) obj
;
66 if (other
.raFile
!= null) {
69 } else if (!raFile
.equals(other
.raFile
)) {