Commit | Line | Data |
---|---|---|
72eda778 ASL |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2009, 2010 Ericsson\r | |
3 | * \r | |
4 | * All rights reserved. This program and the accompanying materials are\r | |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
8 | * \r | |
9 | * Contributors:\r | |
10 | * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
f6281059 ASL |
12 | package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;\r |
13 | \r | |
14 | import java.util.Vector;\r | |
15 | \r | |
16 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITmfTimeAnalysisEntry;\r | |
17 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.TimeEvent;\r | |
18 | \r | |
3b38ea61 | 19 | @SuppressWarnings("nls")\r |
f6281059 | 20 | public class TraceImpl implements ITmfTimeAnalysisEntry {\r |
72eda778 ASL |
21 | // ========================================================================\r |
22 | // Data\r | |
23 | // ========================================================================\r | |
f6281059 ASL |
24 | private int id = 0;\r |
25 | private String name = "traceDefaultName";\r | |
26 | private long startTime = 0;\r | |
27 | private long stopTime = 1;\r | |
28 | private String groupName = "defaultGroupName";\r | |
29 | private String className = "defaultClassName";\r | |
7d3067e2 | 30 | private Vector<TimeEvent> traceEvents = new Vector<TimeEvent>();\r |
72eda778 ASL |
31 | \r |
32 | // ========================================================================\r | |
33 | // Constructor\r | |
34 | // ========================================================================\r | |
f6281059 ASL |
35 | \r |
36 | public TraceImpl(int id, String name, long sTime, long stopTime,\r | |
37 | String groupName, String className) {\r | |
38 | this.id = id;\r | |
39 | this.name = name;\r | |
40 | this.startTime = sTime;\r | |
41 | this.stopTime = stopTime;\r | |
42 | this.groupName = groupName;\r | |
43 | this.className = className;\r | |
44 | }\r | |
45 | \r | |
72eda778 ASL |
46 | // ========================================================================\r |
47 | // Methods\r | |
48 | // ========================================================================\r | |
49 | \r | |
50 | public String getClassName() {\r | |
51 | return className;\r | |
52 | }\r | |
53 | \r | |
54 | public void setClassName(String className) {\r | |
55 | this.className = className;\r | |
56 | }\r | |
57 | \r | |
f6281059 ASL |
58 | public void setGroupName(String groupName) {\r |
59 | this.groupName = groupName;\r | |
60 | }\r | |
61 | \r | |
62 | public void setId(int id) {\r | |
63 | this.id = id;\r | |
64 | }\r | |
65 | \r | |
66 | public void setName(String name) {\r | |
67 | this.name = name;\r | |
68 | }\r | |
69 | \r | |
70 | public void setStartTime(long startTime) {\r | |
71 | this.startTime = startTime;\r | |
72 | }\r | |
73 | \r | |
74 | public void setStopTime(long stopTime) {\r | |
75 | this.stopTime = stopTime;\r | |
76 | }\r | |
77 | \r | |
d4011df2 | 78 | @Override\r |
f6281059 ASL |
79 | public String getGroupName() {\r |
80 | return groupName;\r | |
81 | }\r | |
82 | \r | |
d4011df2 | 83 | @Override\r |
f6281059 ASL |
84 | public int getId() {\r |
85 | return id;\r | |
86 | }\r | |
87 | \r | |
d4011df2 | 88 | @Override\r |
f6281059 ASL |
89 | public String getName() {\r |
90 | return name;\r | |
91 | }\r | |
92 | \r | |
d4011df2 | 93 | @Override\r |
f6281059 ASL |
94 | public long getStartTime() {\r |
95 | return startTime;\r | |
96 | }\r | |
97 | \r | |
d4011df2 | 98 | @Override\r |
f6281059 ASL |
99 | public long getStopTime() {\r |
100 | return stopTime;\r | |
101 | }\r | |
102 | \r | |
d4011df2 | 103 | @Override\r |
f6281059 ASL |
104 | @SuppressWarnings("unchecked")\r |
105 | public Vector<TimeEvent> getTraceEvents() {\r | |
106 | return traceEvents;\r | |
107 | }\r | |
108 | \r | |
109 | }\r |