Class GridAggregate
java.lang.Object
com.codename1.ui.table.GridAggregate
What a group row of a DataGrid shows in a column: the values of the
group's rows folded into one.
fold is called once per row of the group, in order, with what it
returned for the rows before; the first call gets null. finish turns
the last result into what is shown. An aggregate keeps no state of its
own, so one instance serves every group and every column.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GridAggregateThe mean of the numbers; other values are skipped.static final GridAggregateHow many rows have a value that is not null.static final GridAggregateThe largest value in the column's order.static final GridAggregateThe smallest value in the column's order.static final GridAggregateThe sum of the numbers; other values are skipped. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SUM
The sum of the numbers; other values are skipped. -
AVERAGE
The mean of the numbers; other values are skipped. -
MIN
The smallest value in the column's order. -
MAX
The largest value in the column's order. -
COUNT
How many rows have a value that is not null.
-
-
Constructor Details
-
GridAggregate
public GridAggregate()
-
-
Method Details
-
fold
Folds one more value into the result so far.
Parameters
column: the column, for its ordersoFar: what the previous call returned, null on the firstvalue: the row's value
-
finish
-