- All Implemented Interfaces:
public class TallyStoreextends TallyThis class is a variant of
Tallyfor which the individual observations are stored in a list implemented as a
DoubleArrayListobject used to store the values can be either passed to the constructor or created by the constructor, and can be accessed via the
The same counters as in
Tallyare maintained and are used by the inherited methods. One must access the list of observations to compute quantities not supported by the methods in
Tally, and/or to use methods provided by the COLT package.
Never add or remove observations directly on the
DoubleArrayListobject, because this would put the counters of the TallyStore object in an inconsistent state.
There are two potential reasons for using a
TallyStoreobject instead of directly using a
DoubleArrayListobject: (a) it can broadcast observations and (b) it maintains a few additional counters that may speed up some operations such as computing the average.