Returns a collector that produces the arithmetic mean of the given function applied to the elements. If there are no elements, the result is 0.
The mapper function must not return null.
mapper |
a mapping function |
the collector implementation |