From 5aaa97db20a60e716a33e29eeac75dcf4858d638 Mon Sep 17 00:00:00 2001 From: Alexandre Montplaisir Date: Mon, 1 Oct 2012 11:44:16 -0400 Subject: [PATCH] tmf: Rename the UI TmfStatistics class to TmfStatisticsValues To avoid a clash with the new tmf.core.statistics.TmfStatistics. Change-Id: Iae1b5cea64c6a441e4dc3ea63c860537a69b24ac Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/8005 Reviewed-by: Bernd Hufmann IP-Clean: Bernd Hufmann Tested-by: Bernd Hufmann Tested-by: Hudson CI --- .../tests/statistics/TmfStatisticsTest.java | 4 +-- .../model/TmfStatisticsTreeNode.java | 8 ++--- ...atistics.java => TmfStatisticsValues.java} | 29 ++++--------------- 3 files changed, 12 insertions(+), 29 deletions(-) rename org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/{TmfStatistics.java => TmfStatisticsValues.java} (86%) diff --git a/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTest.java b/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTest.java index 3c5e22d1a9..ee114437b8 100644 --- a/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTest.java +++ b/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/statistics/TmfStatisticsTest.java @@ -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/TmfStatisticsTreeNode.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java index f6a42fd990..c5cb4cf942 100755 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java @@ -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/TmfStatistics.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java similarity index 86% rename from org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatistics.java rename to org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsValues.java index a6fffd5cc9..506c8e935a 100755 --- 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/TmfStatisticsValues.java @@ -13,38 +13,32 @@ package org.eclipse.linuxtools.tmf.ui.viewers.statistics.model; /** - * Primitive container for Statistics data + * Primitive container for Statistics values. * * Contains information about statistics that can be retrieved with any type of - * traces + * 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 + * 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 + * @author Mathieu Denis * @version 2.0 * @since 2.0 - * @author Mathieu Denis */ -public class TmfStatistics { +public class TmfStatisticsValues { /** * 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; @@ -52,7 +46,6 @@ public class TmfStatistics { /** * @return the partial events count within a time range - * @since 2.0 */ public long getPartial() { return fNbEventsInTimeRange; @@ -60,8 +53,6 @@ public class TmfStatistics { /** * Increments by one the total number of events. - * - * @since 2.0 */ public void incrementTotal() { ++fNbEvents; @@ -73,7 +64,6 @@ public class TmfStatistics { * @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) { @@ -84,8 +74,6 @@ public class TmfStatistics { /** * Increments by one the number of events within a time range (partial events * count). - * - * @since 2.0 */ public void incrementPartial() { ++fNbEventsInTimeRange; @@ -98,7 +86,6 @@ public class TmfStatistics { * @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) { @@ -108,8 +95,6 @@ public class TmfStatistics { /** * Resets the total number of events. - * - * @since 2.0 */ public void resetTotalCount() { fNbEvents = 0; @@ -117,8 +102,6 @@ public class TmfStatistics { /** * Resets the number of events within a time range (partial events count). - * - * @since 2.0 */ public void resetPartialCount() { fNbEventsInTimeRange = 0; -- 2.34.1