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("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 getStopTime() {
82 public Iterator
<ITimeEvent
> getTimeEventsIterator() {
83 return traceEvents
.iterator();
87 public Iterator
<ITimeEvent
> getTimeEventsIterator(long startTime
, long stopTime
, long maxDuration
) {
88 return traceEvents
.iterator();
91 public void addTraceEvent(ITimeEvent event
) {
92 traceEvents
.add(event
);
96 public ITimeGraphEntry
[] getChildren() {
101 public ITimeGraphEntry
getParent() {
106 public boolean hasChildren() {
This page took 0.033453 seconds and 6 git commands to generate.