1 /*******************************************************************************
2 * Copyright (c) 2009, 2014 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
.tracecompass
.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
.jdt
.annotation
.NonNull
;
19 import org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
20 import org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
22 @SuppressWarnings("javadoc")
23 public class TraceImpl
implements ITimeGraphEntry
{
25 // ========================================================================
27 // ========================================================================
29 private String name
= "traceDefaultName";
30 private long startTime
= 0;
31 private long stopTime
= 1;
32 private String className
= "defaultClassName";
33 private Vector
<@NonNull ITimeEvent
> traceEvents
= new Vector
<>();
35 // ========================================================================
37 // ========================================================================
39 public TraceImpl(String name
, long sTime
, long stopTime
, String className
) {
41 this.startTime
= sTime
;
42 this.stopTime
= stopTime
;
43 this.className
= className
;
46 // ========================================================================
48 // ========================================================================
50 public String
getClassName() {
54 public void setClassName(String className
) {
55 this.className
= className
;
58 public void setName(String name
) {
62 public void setStartTime(long startTime
) {
63 this.startTime
= startTime
;
66 public void setStopTime(long stopTime
) {
67 this.stopTime
= stopTime
;
71 public String
getName() {
76 public long getStartTime() {
81 public long getEndTime() {
86 public boolean hasTimeEvents() {
87 return traceEvents
!= null;
91 public Iterator
<@NonNull ITimeEvent
> getTimeEventsIterator() {
92 return traceEvents
.iterator();
96 public Iterator
<@NonNull ITimeEvent
> getTimeEventsIterator(long aStartTime
, long aStopTime
, long maxDuration
) {
97 return traceEvents
.iterator();
100 public void addTraceEvent(@NonNull ITimeEvent event
) {
101 traceEvents
.add(event
);
105 public List
<@NonNull ITimeGraphEntry
> getChildren() {
110 public ITimeGraphEntry
getParent() {
115 public boolean hasChildren() {
This page took 0.044923 seconds and 6 git commands to generate.