protected static interface Accumulator.DataBundle extends Undoable
Accumulator.createDataBundle()
whenever an accumulator is first created (the primary bundle), and
thereafter, whenever a break group is added to the accumulator (a break
group bundle).
A data bundle implementation manages the implementation specific data required to generate an accumulator's statistic. It must be able to:
accumulate(com.goldencode.p2j.util.BaseDataType)
);
reset()
);
and
calculate()
).
The implementation need not be concerned with when to do these things; the methods will be invoked by the enclosing class at the appropriate times.
Modifier and Type | Method and Description |
---|---|
void |
accumulate(BaseDataType datum)
Accumulate a piece of data for the current loop iteration.
|
BaseDataType |
calculate()
Calculate the result, based on the data currently stored in the
bundle.
|
void |
reset()
Reset any data bundle state which is break group specific.
|
void reset()
Accumulator.iterate(boolean)
method whenever the iteration
transitions into a new break group.void accumulate(BaseDataType datum)
Accumulator.iterate(boolean)
method on each loop
iteration.datum
- Datum to be accumulated.BaseDataType calculate()