74e0c9fad252eb51b20f97e9e47b7dac7ed5def3
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
.timegraph
.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
.ITimeGraphEntry
;
20 @SuppressWarnings({"javadoc", "nls"})
21 public class TraceImpl
implements ITimeGraphEntry
{
22 // ========================================================================
24 // ========================================================================
25 private String name
= "traceDefaultName";
26 private long startTime
= 0;
27 private long stopTime
= 1;
28 private String className
= "defaultClassName";
29 private Vector
<ITimeEvent
> traceEvents
= new Vector
<ITimeEvent
>();
31 // ========================================================================
33 // ========================================================================
35 public TraceImpl(String name
, long sTime
, long stopTime
, String className
) {
37 this.startTime
= sTime
;
38 this.stopTime
= stopTime
;
39 this.className
= className
;
42 // ========================================================================
44 // ========================================================================
46 public String
getClassName() {
50 public void setClassName(String className
) {
51 this.className
= className
;
54 public void setName(String name
) {
58 public void setStartTime(long startTime
) {
59 this.startTime
= startTime
;
62 public void setStopTime(long stopTime
) {
63 this.stopTime
= stopTime
;
67 public String
getName() {
72 public long getStartTime() {
77 public long getEndTime() {
82 public boolean hasTimeEvents() {
83 return traceEvents
!= null;
87 public Iterator
<ITimeEvent
> getTimeEventsIterator() {
88 return traceEvents
.iterator();
92 public Iterator
<ITimeEvent
> getTimeEventsIterator(long aStartTime
, long aStopTime
, long maxDuration
) {
93 return traceEvents
.iterator();
96 public void addTraceEvent(ITimeEvent event
) {
97 traceEvents
.add(event
);
101 public ITimeGraphEntry
[] getChildren() {
106 public ITimeGraphEntry
getParent() {
111 public boolean hasChildren() {
This page took 0.034277 seconds and 4 git commands to generate.