Package org.openrefine.browsing.facets
Interface RowAggregator<T>
-
- All Superinterfaces:
Combiner<T>
,Serializable
- All Known Implementing Classes:
AllFacetsAggregator
,ExpressionValueFacetAggregator
,FacetAggregator
,NumericFacetAggregator
,RowInRecordAggregator
,ScatterplotFacetAggregator
,StringFacetAggregator
,StringValuesFacetAggregator
,TextSearchFacet.TextSearchAggregator
,TimeRangeFacetAggregator
public interface RowAggregator<T> extends Combiner<T>
Computes a value of type T by aggregation over rows in a grid. Most importantly this is used to compute facet statistics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
withRow(T state, long rowId, Row row)
Adds statistics obtained from a single row to the aggregation state.
-
-
-
Method Detail
-
withRow
T withRow(T state, long rowId, Row row)
Adds statistics obtained from a single row to the aggregation state. Given that states are expected to be immutable, this returns a aggregation state object. This function is required to be associative with the combining function: combine(a, withRow(b, rowId, row)) == withRow(combine(a, b), rowId, row)- Parameters:
rowId
- the row id of the row to ingestrow
- the row to ingest- Returns:
- the aggregation state updated with this row
-
-