1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
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
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timeAnalysis
.test
.stub
.model
;
14 import java
.util
.Iterator
;
15 import java
.util
.Vector
;
17 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
18 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITmfTimeAnalysisEntry
;
20 @SuppressWarnings("nls")
21 public class TraceImpl
implements ITmfTimeAnalysisEntry
{
22 // ========================================================================
24 // ========================================================================
26 private String name
= "traceDefaultName";
27 private long startTime
= 0;
28 private long stopTime
= 1;
29 private String groupName
= "defaultGroupName";
30 private String className
= "defaultClassName";
31 private Vector
<ITimeEvent
> traceEvents
= new Vector
<ITimeEvent
>();
33 // ========================================================================
35 // ========================================================================
37 public TraceImpl(int id
, String name
, long sTime
, long stopTime
,
38 String groupName
, String className
) {
41 this.startTime
= sTime
;
42 this.stopTime
= stopTime
;
43 this.groupName
= groupName
;
44 this.className
= className
;
47 // ========================================================================
49 // ========================================================================
51 public String
getClassName() {
55 public void setClassName(String className
) {
56 this.className
= className
;
59 public void setGroupName(String groupName
) {
60 this.groupName
= groupName
;
63 public void setId(int id
) {
67 public void setName(String name
) {
71 public void setStartTime(long startTime
) {
72 this.startTime
= startTime
;
75 public void setStopTime(long stopTime
) {
76 this.stopTime
= stopTime
;
80 public String
getGroupName() {
90 public String
getName() {
95 public long getStartTime() {
100 public long getStopTime() {
105 @Deprecated public Vector
<ITimeEvent
> getTraceEvents() {
110 public Iterator
<ITimeEvent
> getTraceEventsIterator() {
111 return traceEvents
.iterator();
115 public Iterator
<ITimeEvent
> getTraceEventsIterator(long startTime
, long stopTime
, long maxDuration
) {
116 return traceEvents
.iterator();
120 public void addTraceEvent(ITimeEvent event
) {
121 traceEvents
.add(event
);
This page took 0.039879 seconds and 5 git commands to generate.