f9c884f7dd0aac27666899d65bb889216402c56d
1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 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
.timegraph
.test
.stub
.model
;
14 import java
.util
.Iterator
;
15 import java
.util
.List
;
16 import java
.util
.Vector
;
18 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
19 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
21 @SuppressWarnings({"javadoc", "nls"})
22 public class TraceImpl
implements ITimeGraphEntry
{
23 // ========================================================================
25 // ========================================================================
26 private String name
= "traceDefaultName";
27 private long startTime
= 0;
28 private long stopTime
= 1;
29 private String className
= "defaultClassName";
30 private Vector
<ITimeEvent
> traceEvents
= new Vector
<ITimeEvent
>();
32 // ========================================================================
34 // ========================================================================
36 public TraceImpl(String name
, long sTime
, long stopTime
, String className
) {
38 this.startTime
= sTime
;
39 this.stopTime
= stopTime
;
40 this.className
= className
;
43 // ========================================================================
45 // ========================================================================
47 public String
getClassName() {
51 public void setClassName(String className
) {
52 this.className
= className
;
55 public void setName(String name
) {
59 public void setStartTime(long startTime
) {
60 this.startTime
= startTime
;
63 public void setStopTime(long stopTime
) {
64 this.stopTime
= stopTime
;
68 public String
getName() {
73 public long getStartTime() {
78 public long getEndTime() {
83 public boolean hasTimeEvents() {
84 return traceEvents
!= null;
88 public Iterator
<ITimeEvent
> getTimeEventsIterator() {
89 return traceEvents
.iterator();
93 public Iterator
<ITimeEvent
> getTimeEventsIterator(long aStartTime
, long aStopTime
, long maxDuration
) {
94 return traceEvents
.iterator();
97 public void addTraceEvent(ITimeEvent event
) {
98 traceEvents
.add(event
);
102 public List
<ITimeGraphEntry
> getChildren() {
107 public ITimeGraphEntry
getParent() {
112 public boolean hasChildren() {
This page took 0.032585 seconds and 5 git commands to generate.