1 /*******************************************************************************
2 * Copyright (c) 2011, 2015 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 * Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
11 * Bernd Hufmann - Allow zero value in setValue()
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.tmf
.ui
.viewers
.statistics
.model
;
17 * Primitive container for Statistics values.
19 * Contains information about statistics that can be retrieved with any type of
22 * There are two counters : one for the total number of events in the trace, and
23 * another for the number of events in the selected time range.
25 * @author Mathieu Denis
27 public class TmfStatisticsValues
{
30 * Total number of events.
32 protected long fNbEvents
= 0;
35 * Number of events within a time range (Partial event count).
37 protected long fNbEventsInTimeRange
= 0;
40 * @return the total events count
42 public long getTotal() {
47 * @return the partial events count within a time range
49 public long getPartial() {
50 return fNbEventsInTimeRange
;
54 * Set either the "global" or the "time range" value.
57 * True to set the global value, false for the timerange one.
59 * The new value to set
61 public void setValue(boolean global
, long nb
) {
66 fNbEventsInTimeRange
= nb
;
72 * Resets the total number of events.
74 public void resetTotalCount() {
79 * Resets the number of events within a time range (partial events count).
81 public void resetPartialCount() {
82 fNbEventsInTimeRange
= 0;
86 public String
toString() {
87 return fNbEvents
+ ", " + fNbEventsInTimeRange
; //$NON-NLS-1$
This page took 0.035342 seconds and 5 git commands to generate.