Monster fix: TMF model update + corresponding LTTng adaptations + JUnits
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / event / TmfEventSource.java
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:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.event;
14
15 /**
16 * <b><u>TmfEventSource</u></b>
17 * <p>
18 * The event source.
19 */
20 public class TmfEventSource implements Cloneable {
21
22 // ========================================================================
23 // Attributes
24 // ========================================================================
25
26 protected Object fSourceId;
27
28 // ========================================================================
29 // Constructors
30 // ========================================================================
31
32 /**
33 *
34 */
35 public TmfEventSource() {
36 this(null);
37 }
38
39 /**
40 * @param sourceId
41 */
42 public TmfEventSource(Object sourceId) {
43 fSourceId = sourceId;
44 }
45
46 /**
47 * @param other
48 */
49 public TmfEventSource(TmfEventSource other) {
50 this((other != null) ? other.fSourceId : null);
51 }
52
53 // ========================================================================
54 // Accessors
55 // ========================================================================
56
57 /**
58 * @return
59 */
60 public Object getSourceId() {
61 return fSourceId;
62 }
63
64 // ========================================================================
65 // Operators
66 // ========================================================================
67
68 @Override
69 public TmfEventSource clone() {
70 return new TmfEventSource(this);
71 }
72
73 @Override
74 public String toString() {
75 return "[TmfEventSource(" + ((fSourceId != null) ? fSourceId.toString() : "null") + ")]";
76 }
77
78 }
This page took 0.032724 seconds and 5 git commands to generate.