Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
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: | |
1f506a43 | 10 | * Francois Chouinard - Initial API and implementation |
8c8bf09f ASL |
11 | *******************************************************************************/ |
12 | ||
13 | package org.eclipse.linuxtools.tmf.event; | |
14 | ||
15 | /** | |
16 | * <b><u>TmfEventReference</u></b> | |
17 | * <p> | |
18 | * An application-defined event reference. | |
19 | */ | |
28b94d61 | 20 | public class TmfEventReference implements Cloneable { |
8c8bf09f | 21 | |
4ab33d2b | 22 | // ======================================================================== |
8c8bf09f | 23 | // Attributes |
4ab33d2b | 24 | // ======================================================================== |
8c8bf09f | 25 | |
28b94d61 | 26 | protected Object fReference; |
8c8bf09f | 27 | |
4ab33d2b | 28 | // ======================================================================== |
8c8bf09f | 29 | // Constructors |
4ab33d2b | 30 | // ======================================================================== |
8c8bf09f | 31 | |
28b94d61 FC |
32 | /** |
33 | * | |
34 | */ | |
35 | public TmfEventReference() { | |
36 | this(null); | |
37 | } | |
38 | ||
8c8bf09f | 39 | /** |
4ab33d2b | 40 | * @param reference |
8c8bf09f ASL |
41 | */ |
42 | public TmfEventReference(Object reference) { | |
43 | fReference = reference; | |
44 | } | |
45 | ||
28b94d61 FC |
46 | /** |
47 | * @param other | |
48 | */ | |
49 | public TmfEventReference(TmfEventReference other) { | |
50 | this((other != null) ? other.fReference : null); | |
51 | } | |
52 | ||
4ab33d2b | 53 | // ======================================================================== |
8c8bf09f | 54 | // Accessors |
4ab33d2b | 55 | // ======================================================================== |
8c8bf09f ASL |
56 | |
57 | /** | |
4ab33d2b | 58 | * @return |
8c8bf09f | 59 | */ |
28b94d61 | 60 | public Object getReference() { |
8c8bf09f ASL |
61 | return fReference; |
62 | } | |
1f506a43 FC |
63 | |
64 | // ======================================================================== | |
65 | // Operators | |
66 | // ======================================================================== | |
67 | ||
28b94d61 FC |
68 | @Override |
69 | public TmfEventReference clone() { | |
70 | return new TmfEventReference(this); | |
71 | } | |
72 | ||
1f506a43 FC |
73 | @Override |
74 | public String toString() { | |
28b94d61 | 75 | return "[TmfEventReference(" + ((fReference != null) ? fReference.toString() : "null") + ")]"; |
1f506a43 FC |
76 | } |
77 | ||
8c8bf09f | 78 | } |