tmf: Rename the UI TmfStatistics class to TmfStatisticsValues
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 1 Oct 2012 15:44:16 +0000 (11:44 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 1 Oct 2012 21:16:58 +0000 (17:16 -0400)
To avoid a clash with the new tmf.core.statistics.TmfStatistics.

Change-Id: Iae1b5cea64c6a441e4dc3ea63c860537a69b24ac
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/8005
Reviewed-by: Bernd Hufmann <bhufmann@gmail.com>
IP-Clean: Bernd Hufmann <bhufmann@gmail.com>
Tested-by: Bernd Hufmann <bhufmann@gmail.com>
Tested-by: Hudson CI
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTest.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatistics.java [deleted file]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java [new file with mode: 0755]

index 3c5e22d1a91b398372e67b9a0448f49d0534d839..ee114437b8741b2750ca36a7f2eaf3080ec90710 100644 (file)
@@ -1,6 +1,6 @@
 package org.eclipse.linuxtools.tmf.ui.tests.statistics;
 
-import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatistics;
+import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsValues;
 
 import junit.framework.TestCase;
 
@@ -13,7 +13,7 @@ public class TmfStatisticsTest extends TestCase {
     // Fields
     // ------------------------------------------------------------------------
 
-    TmfStatistics stats = new TmfStatistics();
+    TmfStatisticsValues stats = new TmfStatisticsValues();
 
     // ------------------------------------------------------------------------
     // Checks initial state
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatistics.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatistics.java
deleted file mode 100755 (executable)
index a6fffd5..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 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:
- *   Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.ui.viewers.statistics.model;
-
-/**
- * Primitive container for Statistics data
- *
- * Contains information about statistics that can be retrieved with any type of
- * traces
- *
- * There are two counters : one for the total number of events in the trace and
- * another for the number of events in the selected time range
- *
- * @version 2.0
- * @version 2.0
- * @since 2.0
- * @author Mathieu Denis
- */
-public class TmfStatistics {
-
-    /**
-     * Total number of events.
-     *
-     * @since 2.0
-     */
-    protected long fNbEvents = 0;
-
-    /**
-     * Number of events within a time range (Partial event count).
-     *
-     * @since 2.0
-     */
-    protected long fNbEventsInTimeRange = 0;
-
-    /**
-     * @return the total events count
-     * @since 2.0
-     */
-    public long getTotal() {
-        return fNbEvents;
-    }
-
-    /**
-     * @return the partial events count within a time range
-     * @since 2.0
-     */
-    public long getPartial() {
-        return fNbEventsInTimeRange;
-    }
-
-    /**
-     * Increments by one the total number of events.
-     *
-     * @since 2.0
-     */
-    public void incrementTotal() {
-        ++fNbEvents;
-    }
-
-    /**
-     * Increments <b>nb</b> times the total number of events.
-     *
-     * @param nb
-     *            Amount that will be added to the total events count. Ignored
-     *            if negative.
-     * @since 2.0
-     */
-    public void incrementTotal(int nb) {
-        if (nb > 0) {
-            fNbEvents += nb;
-        }
-    }
-
-    /**
-     * Increments by one the number of events within a time range (partial events
-     * count).
-     *
-     * @since 2.0
-     */
-    public void incrementPartial() {
-        ++fNbEventsInTimeRange;
-    }
-
-    /**
-     * Increments <b>nb</b> times the number of events within a time range
-     * (partial events count).
-     *
-     * @param nb
-     *            Amount that will be added to the partial events count. Ignored
-     *            if negative.
-     * @since 2.0
-     */
-    public void incrementPartial(int nb) {
-        if (nb > 0) {
-            fNbEventsInTimeRange += nb;
-        }
-    }
-
-    /**
-     * Resets the total number of events.
-     *
-     * @since 2.0
-     */
-    public void resetTotalCount() {
-        fNbEvents = 0;
-    }
-
-    /**
-     * Resets the number of events within a time range (partial events count).
-     *
-     * @since 2.0
-     */
-    public void resetPartialCount() {
-        fNbEventsInTimeRange = 0;
-    }
-}
index f6a42fd990efc4d1e0c1911914e4affa671d2f53..c5cb4cf942b72cb6df04c7f0962b908e61ea47bf 100755 (executable)
@@ -34,7 +34,7 @@ public class TmfStatisticsTreeNode {
     /**
      * Value of the node.
      */
-    protected TmfStatistics fValue;
+    protected TmfStatisticsValues fValue;
 
     /**
      * Path of the node.
@@ -58,7 +58,7 @@ public class TmfStatisticsTreeNode {
             AbsTmfStatisticsTree nodes) {
         fPath = path;
         fNodes = nodes;
-        fValue = new TmfStatistics();
+        fValue = new TmfStatisticsValues();
     }
 
     /**
@@ -135,7 +135,7 @@ public class TmfStatisticsTreeNode {
      *
      * @return Value associated with this node.
      */
-    public TmfStatistics getValue() {
+    public TmfStatisticsValues getValue() {
         return fValue;
     }
 
@@ -153,7 +153,7 @@ public class TmfStatisticsTreeNode {
      * no children.
      */
     public void reset() {
-        fValue = new TmfStatistics();
+        fValue = new TmfStatisticsValues();
         fNodes.reset(fPath);
     }
 
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java
new file mode 100755 (executable)
index 0000000..506c8e9
--- /dev/null
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 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:
+ *   Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.viewers.statistics.model;
+
+/**
+ * Primitive container for Statistics values.
+ *
+ * Contains information about statistics that can be retrieved with any type of
+ * traces.
+ *
+ * There are two counters : one for the total number of events in the trace, and
+ * another for the number of events in the selected time range.
+ *
+ * @author Mathieu Denis
+ * @version 2.0
+ * @since 2.0
+ */
+public class TmfStatisticsValues {
+
+    /**
+     * Total number of events.
+     */
+    protected long fNbEvents = 0;
+
+    /**
+     * Number of events within a time range (Partial event count).
+     */
+    protected long fNbEventsInTimeRange = 0;
+
+    /**
+     * @return the total events count
+     */
+    public long getTotal() {
+        return fNbEvents;
+    }
+
+    /**
+     * @return the partial events count within a time range
+     */
+    public long getPartial() {
+        return fNbEventsInTimeRange;
+    }
+
+    /**
+     * Increments by one the total number of events.
+     */
+    public void incrementTotal() {
+        ++fNbEvents;
+    }
+
+    /**
+     * Increments <b>nb</b> times the total number of events.
+     *
+     * @param nb
+     *            Amount that will be added to the total events count. Ignored
+     *            if negative.
+     */
+    public void incrementTotal(int nb) {
+        if (nb > 0) {
+            fNbEvents += nb;
+        }
+    }
+
+    /**
+     * Increments by one the number of events within a time range (partial events
+     * count).
+     */
+    public void incrementPartial() {
+        ++fNbEventsInTimeRange;
+    }
+
+    /**
+     * Increments <b>nb</b> times the number of events within a time range
+     * (partial events count).
+     *
+     * @param nb
+     *            Amount that will be added to the partial events count. Ignored
+     *            if negative.
+     */
+    public void incrementPartial(int nb) {
+        if (nb > 0) {
+            fNbEventsInTimeRange += nb;
+        }
+    }
+
+    /**
+     * Resets the total number of events.
+     */
+    public void resetTotalCount() {
+        fNbEvents = 0;
+    }
+
+    /**
+     * Resets the number of events within a time range (partial events count).
+     */
+    public void resetPartialCount() {
+        fNbEventsInTimeRange = 0;
+    }
+}
This page took 0.028266 seconds and 5 git commands to generate.