Top Description Fields Constructors Methods
org.eclipse.collections.impl.block.procedure

public final Class MutatingAggregationProcedure<T, K, V>

extends Object
implements Procedure<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.block.procedure.Procedure, java.io.Serializable, java.util.function.Consumer
Imports
org.eclipse.collections.api.block.function.Function, .Function0, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.map.MutableMapIterable

This procedure is used to apply an aggregate function like sum on a grouped set of data. The values in the grouping must be mutable using this procedure. An example would be using an AtomicInteger which can be mutated vs. an Integer which cannot.

Field Summary

Modifier and TypeField and Description
private final Function<? super T, ? extends K>
private final MutableMapIterable<K, V>
private final Procedure2<? super V, ? super T>
private static final long
private final Function0<? extends V>

Constructor Summary

AccessConstructor and Description
public
MutatingAggregationProcedure(MutableMapIterable<K, V> map, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

groupByback to summary
private final Function<? super T, ? extends K> groupBy
mapback to summary
private final MutableMapIterable<K, V> map
mutatingAggregatorback to summary
private final Procedure2<? super V, ? super T> mutatingAggregator
serialVersionUIDback to summary
private static final long serialVersionUID
zeroValueFactoryback to summary
private final Function0<? extends V> zeroValueFactory

Constructor Detail

MutatingAggregationProcedureback to summary
public MutatingAggregationProcedure(MutableMapIterable<K, V> map, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator)

Method Detail

valueback to summary
public void value(T each)

Implements org.eclipse.collections.api.block.procedure.Procedure.value.

Annotations
@Override