/
ProfileAggregator.java
24 lines (22 loc) · 1.07 KB
/
ProfileAggregator.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.insightfullogic.honest_profiler.core.aggregation.aggregator;
import com.insightfullogic.honest_profiler.core.aggregation.AggregationProfile;
import com.insightfullogic.honest_profiler.core.aggregation.grouping.CombinedGrouping;
import com.insightfullogic.honest_profiler.core.aggregation.result.Aggregation;
import com.insightfullogic.honest_profiler.core.aggregation.result.Keyed;
/**
* Generic interface for aggregation functions which operate on the entire {@link AggregationProfile}. An Aggregator
* aggregates an input {@link AggregationProfile} into an {@link Aggregation} containing results of type <T>, which are
* keyed by a String.
*
* @param <T> the type of the content items in the resulting {@link Aggregation}
*/
public interface ProfileAggregator<T extends Keyed<String>>
{
/**
* Aggregate the provided {@link AggregationProfile}.
*
* @param input the {@link AggregationProfile} to be aggregated
* @return the resulting {@link Aggregation}
*/
Aggregation<T> aggregate(AggregationProfile input, CombinedGrouping grouping);
}