Commit | Line | Data |
---|---|---|
73005152 | 1 | /********************************************************************** |
c8422608 | 2 | * Copyright (c) 2005, 2013 IBM Corporation, Ericsson |
73005152 BH |
3 | * All rights reserved. This program and the accompanying materials |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
3bd46eef AM |
7 | * |
8 | * Contributors: | |
c8422608 AM |
9 | * IBM - Initial API and implementation |
10 | * Bernd Hufmann - Updated for TMF | |
73005152 | 11 | **********************************************************************/ |
c8422608 | 12 | |
73005152 BH |
13 | package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core; |
14 | ||
3bd46eef | 15 | import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp; |
73005152 BH |
16 | |
17 | /** | |
3bd46eef AM |
18 | * Class implementation of a sequence diagram time event. |
19 | * | |
df0b8ff4 | 20 | * @version 1.0 |
73005152 | 21 | * @author sveyrier |
3bd46eef | 22 | * |
73005152 BH |
23 | */ |
24 | public class SDTimeEvent { | |
25 | ||
df0b8ff4 BH |
26 | // ------------------------------------------------------------------------ |
27 | // Attributes | |
28 | // ------------------------------------------------------------------------ | |
29 | ||
30 | /** | |
31 | * The time stamp of the event | |
32 | */ | |
eb63f5ff | 33 | protected ITmfTimestamp fTimestamp; |
df0b8ff4 BH |
34 | /** |
35 | * The event index. | |
36 | */ | |
eb63f5ff | 37 | protected int fEvent; |
df0b8ff4 BH |
38 | /** |
39 | * The time range implementing node. | |
40 | */ | |
eb63f5ff | 41 | protected ITimeRange fNode; |
73005152 | 42 | |
df0b8ff4 BH |
43 | // ------------------------------------------------------------------------ |
44 | // Constructors | |
45 | // ------------------------------------------------------------------------ | |
46 | /** | |
47 | * The default constructor. | |
3bd46eef | 48 | * |
eb63f5ff BH |
49 | * @param time The time stamp of the event. |
50 | * @param event The event index. | |
51 | * @param node The time range implementing node. | |
3bd46eef | 52 | * @since 2.0 |
df0b8ff4 | 53 | */ |
eb63f5ff BH |
54 | public SDTimeEvent(ITmfTimestamp time, int event, ITimeRange node) { |
55 | fTimestamp = time; | |
56 | fEvent = event; | |
57 | fNode = node; | |
73005152 BH |
58 | } |
59 | ||
df0b8ff4 BH |
60 | // ------------------------------------------------------------------------ |
61 | // Operations | |
62 | // ------------------------------------------------------------------------ | |
63 | /** | |
64 | * Returns the timestamp of the event. | |
3bd46eef | 65 | * |
df0b8ff4 | 66 | * @return the timestamp of the event. |
3bd46eef | 67 | * @since 2.0 |
df0b8ff4 | 68 | */ |
4df4581d | 69 | public ITmfTimestamp getTime() { |
eb63f5ff | 70 | return fTimestamp; |
73005152 BH |
71 | } |
72 | ||
df0b8ff4 BH |
73 | /** |
74 | * Returns the event index. | |
3bd46eef | 75 | * |
df0b8ff4 BH |
76 | * @return the event index. |
77 | */ | |
73005152 | 78 | public int getEvent() { |
eb63f5ff | 79 | return fEvent; |
73005152 BH |
80 | } |
81 | ||
df0b8ff4 BH |
82 | /** |
83 | * Returns the time range implementing node. | |
3bd46eef | 84 | * |
df0b8ff4 BH |
85 | * @return the time range implementing node. |
86 | */ | |
73005152 | 87 | public ITimeRange getGraphNode() { |
eb63f5ff | 88 | return fNode; |
73005152 BH |
89 | } |
90 | ||
91 | } |