2010-10-26 Francois Chouinard <fchouinard@gmail.com> Contribution for Bug309042
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / widgetStubs / org / eclipse / linuxtools / tmf / ui / widgets / timeAnalysis / test / stub / model / TraceImpl.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;
13
14 import java.util.Vector;
15
16 import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITmfTimeAnalysisEntry;
17 import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.TimeEvent;
18
19
20 public class TraceImpl implements ITmfTimeAnalysisEntry {
21 // ========================================================================
22 // Data
23 // ========================================================================
24 private int id = 0;
25 private String name = "traceDefaultName";
26 private long startTime = 0;
27 private long stopTime = 1;
28 private String groupName = "defaultGroupName";
29 private String className = "defaultClassName";
30 private Vector<TimeEvent> traceEvents = new Vector<TimeEvent>();
31
32 // ========================================================================
33 // Constructor
34 // ========================================================================
35
36 public TraceImpl(int id, String name, long sTime, long stopTime,
37 String groupName, String className) {
38 this.id = id;
39 this.name = name;
40 this.startTime = sTime;
41 this.stopTime = stopTime;
42 this.groupName = groupName;
43 this.className = className;
44 }
45
46 // ========================================================================
47 // Methods
48 // ========================================================================
49
50 public String getClassName() {
51 return className;
52 }
53
54 public void setClassName(String className) {
55 this.className = className;
56 }
57
58 public void setGroupName(String groupName) {
59 this.groupName = groupName;
60 }
61
62 public void setId(int id) {
63 this.id = id;
64 }
65
66 public void setName(String name) {
67 this.name = name;
68 }
69
70 public void setStartTime(long startTime) {
71 this.startTime = startTime;
72 }
73
74 public void setStopTime(long stopTime) {
75 this.stopTime = stopTime;
76 }
77
78 @Override
79 public String getGroupName() {
80 return groupName;
81 }
82
83 @Override
84 public int getId() {
85 return id;
86 }
87
88 @Override
89 public String getName() {
90 return name;
91 }
92
93 @Override
94 public long getStartTime() {
95 return startTime;
96 }
97
98 @Override
99 public long getStopTime() {
100 return stopTime;
101 }
102
103 @Override
104 @SuppressWarnings("unchecked")
105 public Vector<TimeEvent> getTraceEvents() {
106 return traceEvents;
107 }
108
109 }
This page took 0.032242 seconds and 5 git commands to generate.