Package org.openrefine.browsing.facets
Interface RecordAggregator<T>
-
- All Superinterfaces:
Combiner<T>
,Serializable
- All Known Implementing Classes:
AllFacetsAggregator
,ExpressionValueFacetAggregator
,FacetAggregator
,NumericFacetAggregator
,RowInRecordAggregator
,ScatterplotFacetAggregator
,StringFacetAggregator
,StringValuesFacetAggregator
,TextSearchFacet.TextSearchAggregator
,TimeRangeFacetAggregator
public interface RecordAggregator<T> extends Combiner<T>
Computes a value of type T by aggregation over records 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
withRecord(T state, Record record)
Adds statistics obtained from a single record to the aggregation state.
-
-
-
Method Detail
-
withRecord
T withRecord(T state, Record record)
Adds statistics obtained from a single record to the aggregation state. Given that states are expected to be immutable, this returns a new aggregation state object. This function is required to be associative with the combining function: combine(a, withRecord(b, record)) == withRecord(combine(a, b), record)- Parameters:
state
- the current aggregation staterecord
- the record to ingest- Returns:
- the aggregation state updated with this row
-
-