Package org.djutils.stats.summarizers
Interface CounterInterface
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Counter,EventBasedCounter
public interface CounterInterface extends Serializable
The Counter interface defines the methods to implement for a statistics event counter.Copyright (c) 2002-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://simulation.tudelft.nl/dsol/3.0/license.html.
- Author:
- Alexander Verbraeck, Peter Jacobs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCount()Returns the current counter value.StringgetDescription()Returns the description of the counter.longgetN()Returns the current number of observations.longingest(long value)Process one observed value.voidinitialize()Initializes the counter.
-
-
-
Method Detail
-
initialize
void initialize()
Initializes the counter.
-
ingest
long ingest(long value)
Process one observed value.- Parameters:
value- long; the value to process- Returns:
- long; the value
-
getDescription
String getDescription()
Returns the description of the counter.- Returns:
- String; the description
-
getCount
long getCount()
Returns the current counter value.- Returns:
- long; the counter value
-
getN
long getN()
Returns the current number of observations.- Returns:
- long; the number of observations
-
-