Commit | Line | Data |
---|---|---|
73005152 BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2011 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 | * Bernd Hufmann - Initial API and implementation | |
11 | **********************************************************************/ | |
6c13869b | 12 | package org.eclipse.linuxtools.tmf.core.uml2sd; |
73005152 | 13 | |
4df4581d | 14 | import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; |
6c13869b | 15 | import org.eclipse.linuxtools.tmf.core.event.TmfEvent; |
73005152 BH |
16 | |
17 | /** | |
18 | * <b><u>TmfAsyncSequenceDiagramEvent</u></b> | |
19 | * <p> | |
20 | * Sample implementation of the ITmfAsyncSequenceDiagramEvent | |
21 | * </p> | |
22 | */ | |
23 | public class TmfAsyncSequenceDiagramEvent extends TmfSyncSequenceDiagramEvent implements ITmfAsyncSequenceDiagramEvent { | |
24 | ||
25 | // ------------------------------------------------------------------------ | |
26 | // Attributes | |
27 | // ------------------------------------------------------------------------ | |
4df4581d | 28 | |
29 | final protected ITmfTimestamp fEndTime; | |
73005152 BH |
30 | |
31 | // ------------------------------------------------------------------------ | |
32 | // Constructors | |
33 | // ------------------------------------------------------------------------ | |
34 | public TmfAsyncSequenceDiagramEvent(TmfEvent startEvent, TmfEvent endEvent, String sender, String receiver, String name) { | |
35 | super(startEvent, sender, receiver, name); | |
36 | ||
37 | if (endEvent == null) { | |
38 | throw new IllegalArgumentException("TmfAsyncSequenceDiagramEvent constructor: endEvent=null"); //$NON-NLS-1$ | |
39 | } | |
40 | fEndTime = endEvent.getTimestamp().clone(); | |
41 | } | |
42 | ||
43 | // ------------------------------------------------------------------------ | |
44 | // Operations | |
45 | // ------------------------------------------------------------------------ | |
46 | ||
47 | /* | |
48 | * (non-Javadoc) | |
49 | * @see org.eclipse.linuxtools.tmf.uml2sd.ITmfAsyncSequenceDiagramEvent#getEndTime() | |
50 | */ | |
51 | @Override | |
4df4581d | 52 | public ITmfTimestamp getEndTime() { |
73005152 BH |
53 | return fEndTime; |
54 | } | |
55 | } |