-/*******************************************************************************\r
- * Copyright (c) 2009, 2010 Ericsson\r
- * \r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
- * Contributors:\r
- * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
- *******************************************************************************/\r
-package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.model;\r
-\r
-import java.util.Iterator;\r
-import java.util.Vector;\r
-\r
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r
-\r
-@SuppressWarnings("nls")\r
-public class TraceImpl implements ITimeGraphEntry {\r
- // ========================================================================\r
- // Data\r
- // ========================================================================\r
- private String name = "traceDefaultName";\r
- private long startTime = 0;\r
- private long stopTime = 1;\r
- private String className = "defaultClassName";\r
- private Vector<ITimeEvent> traceEvents = new Vector<ITimeEvent>();\r
- \r
- // ========================================================================\r
- // Constructor\r
- // ========================================================================\r
-\r
- public TraceImpl(String name, long sTime, long stopTime, String className) {\r
- this.name = name;\r
- this.startTime = sTime;\r
- this.stopTime = stopTime;\r
- this.className = className;\r
- }\r
-\r
- // ========================================================================\r
- // Methods\r
- // ========================================================================\r
-\r
- public String getClassName() {\r
- return className;\r
- }\r
-\r
- public void setClassName(String className) {\r
- this.className = className;\r
- }\r
-\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
-\r
- public void setStartTime(long startTime) {\r
- this.startTime = startTime;\r
- }\r
-\r
- public void setStopTime(long stopTime) {\r
- this.stopTime = stopTime;\r
- }\r
-\r
- @Override\r
- public String getName() {\r
- return name;\r
- }\r
-\r
- @Override\r
- public long getStartTime() {\r
- return startTime;\r
- }\r
-\r
- @Override\r
- public long getEndTime() {\r
- return stopTime;\r
- }\r
-\r
- @Override\r
- public Iterator<ITimeEvent> getTimeEventsIterator() {\r
- return traceEvents.iterator();\r
- }\r
-\r
- @Override\r
- public Iterator<ITimeEvent> getTimeEventsIterator(long startTime, long stopTime, long maxDuration) {\r
- return traceEvents.iterator();\r
- }\r
-\r
- public void addTraceEvent(ITimeEvent event) {\r
- traceEvents.add(event);\r
- }\r
-\r
- @Override\r
- public ITimeGraphEntry[] getChildren() {\r
- return null;\r
- }\r
-\r
- @Override\r
- public ITimeGraphEntry getParent() {\r
- return null;\r
- }\r
-\r
- @Override\r
- public boolean hasChildren() {\r
- return false;\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2009, 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.model;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+
+@SuppressWarnings({"javadoc", "nls"})
+public class TraceImpl implements ITimeGraphEntry {
+ // ========================================================================
+ // Data
+ // ========================================================================
+ private String name = "traceDefaultName";
+ private long startTime = 0;
+ private long stopTime = 1;
+ private String className = "defaultClassName";
+ private Vector<ITimeEvent> traceEvents = new Vector<ITimeEvent>();
+
+ // ========================================================================
+ // Constructor
+ // ========================================================================
+
+ public TraceImpl(String name, long sTime, long stopTime, String className) {
+ this.name = name;
+ this.startTime = sTime;
+ this.stopTime = stopTime;
+ this.className = className;
+ }
+
+ // ========================================================================
+ // Methods
+ // ========================================================================
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setStartTime(long startTime) {
+ this.startTime = startTime;
+ }
+
+ public void setStopTime(long stopTime) {
+ this.stopTime = stopTime;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public long getStartTime() {
+ return startTime;
+ }
+
+ @Override
+ public long getEndTime() {
+ return stopTime;
+ }
+
+ @Override
+ public boolean hasTimeEvents() {
+ return traceEvents != null;
+ }
+
+ @Override
+ public Iterator<ITimeEvent> getTimeEventsIterator() {
+ return traceEvents.iterator();
+ }
+
+ @Override
+ public Iterator<ITimeEvent> getTimeEventsIterator(long aStartTime, long aStopTime, long maxDuration) {
+ return traceEvents.iterator();
+ }
+
+ public void addTraceEvent(ITimeEvent event) {
+ traceEvents.add(event);
+ }
+
+ @Override
+ public List<ITimeGraphEntry> getChildren() {
+ return null;
+ }
+
+ @Override
+ public ITimeGraphEntry getParent() {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return false;
+ }
+
+}