private class MinimumAccumulator.Data extends java.lang.Object implements Accumulator.DataBundle
DataBundle
implementation which keeps track of the
minimum data value accumulated, and returns it upon request.Modifier and Type | Field and Description |
---|---|
private BaseDataType |
min
The current minimum value
|
Modifier | Constructor and Description |
---|---|
private |
Data() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(BaseDataType datum)
Compare
datum to the current minimum value. |
void |
assign(Undoable value)
Sets the state of this instance based on the state of the passed instance.
|
BaseDataType |
calculate()
Return the minimum value accumulated.
|
Undoable |
deepCopy()
This is a form of a copy constructor that makes a deep copy of the
current instance and returns this copy as a new instance of the same
class.
|
void |
reset()
Reset to unknown value the minimum value variable, in preparation
for beginning a new break group.
|
private BaseDataType min
public void reset()
reset
in interface Accumulator.DataBundle
public void accumulate(BaseDataType datum)
datum
to the current minimum value. If the
current minimum value is the unknown value, or if datum
compares as less than the current minimum, datum
is
retained as the new minimum value. Otherwise, the old minimum value
is left unchanged.accumulate
in interface Accumulator.DataBundle
datum
- Datum to be accumulated.public BaseDataType calculate()
calculate
in interface Accumulator.DataBundle
public Undoable deepCopy()