Class NonMutatingAggregationProcedure<T,​K,​V>

  • All Implemented Interfaces:
    Serializable, Consumer<T>, Procedure<T>

    public final class NonMutatingAggregationProcedure<T,​K,​V>
    extends Object
    implements Procedure<T>
    This procedure is used to apply an aggregate function like sum on a grouped set of data. The values in the grouping must be immutable using this procedure. An example would be using an Integer which is immutable vs. an AtomicInteger which is not.
    See Also:
    Serialized Form
    • Constructor Detail

      • NonMutatingAggregationProcedure

        public NonMutatingAggregationProcedure​(MutableMapIterable<K,​V> map,
                                               Function<? super T,​? extends K> groupBy,
                                               Function0<? extends V> zeroValueFactory,
                                               Function2<? super V,​? super T,​? extends V> nonMutatingAggregator)
    • Method Detail

      • value

        public void value​(T each)
        Specified by:
        value in interface Procedure<T>