package org.djutils.stats.summarizers; import java.io.Serializable; /** * The Counter interface defines the methods to implement for a statistics event counter. *

* Copyright (c) 2002-2020 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 * @author Peter Jacobs */ public interface CounterInterface extends Serializable { /** * Initializes the counter. */ void initialize(); /** * Process one observed value. * @param value long; the value to process * @return long; the value */ long ingest(long value); /** * Returns the description of the counter. * @return String; the description */ String getDescription(); /** * Returns the current counter value. * @return long; the counter value */ long getCount(); /** * Returns the current number of observations. * @return long; the number of observations */ long getN(); }