R
- the returned value of the handler function -
the resulting map value type.T
- the type of the aggregated collection
the resulting map key type.public class MapAggregator<T,R> extends Object implements Aggregator<Map<T,R>,T>
Handler
Constructor and Description |
---|
MapAggregator(Handler<R,T> valueCalculator) |
public void init(Collection<T> elements)
init
in interface Aggregator<Map<T,R>,T>
elements
- the container that's about to be iterated.
use this function to initialize the aggregation process. for example, you might need to create
a "result" collection and you can set it's size according to elements.size() for performance reasons.public void aggregate(T element)
Copyright © 2004-2016. All Rights Reserved.