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

public final Class NonMutatingAggregationProcedure<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, .Function2, org.eclipse.collections.api.block.procedure.Procedure, 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 immutable using this procedure. An example would be using an Integer which is immutable vs. an AtomicInteger which is not.

Field Summary

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

Constructor Summary

AccessConstructor and Description
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 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
nonMutatingAggregatorback to summary
private final Function2<? super V, ? super T, ? extends V> nonMutatingAggregator
serialVersionUIDback to summary
private static final long serialVersionUID
zeroValueFactoryback to summary
private final Function0<? extends V> zeroValueFactory

Constructor Detail

NonMutatingAggregationProcedureback to summary
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

valueback to summary
public void value(T each)

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

Annotations
@Override