Share via


ConcurrentHashMap.ReduceToInt Method

Definition

Returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.

[Android.Runtime.Register("reduceToInt", "(JLjava/util/function/ToIntBiFunction;ILjava/util/function/IntBinaryOperator;)I", "GetReduceToInt_JLjava_util_function_ToIntBiFunction_ILjava_util_function_IntBinaryOperator_Handler", ApiSince=24)]
public virtual int ReduceToInt (long parallelismThreshold, Java.Util.Functions.IToIntBiFunction transformer, int basis, Java.Util.Functions.IIntBinaryOperator reducer);
[<Android.Runtime.Register("reduceToInt", "(JLjava/util/function/ToIntBiFunction;ILjava/util/function/IntBinaryOperator;)I", "GetReduceToInt_JLjava_util_function_ToIntBiFunction_ILjava_util_function_IntBinaryOperator_Handler", ApiSince=24)>]
abstract member ReduceToInt : int64 * Java.Util.Functions.IToIntBiFunction * int * Java.Util.Functions.IIntBinaryOperator -> int
override this.ReduceToInt : int64 * Java.Util.Functions.IToIntBiFunction * int * Java.Util.Functions.IIntBinaryOperator -> int

Parameters

parallelismThreshold
Int64

the (estimated) number of elements needed for this operation to be executed in parallel

transformer
IToIntBiFunction

a function returning the transformation for an element

basis
Int32

the identity (initial default value) for the reduction

reducer
IIntBinaryOperator

a commutative associative combining function

Returns

the result of accumulating the given transformation of all (key, value) pairs

Attributes

Remarks

Returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, and the given basis as an identity value.

Added in 1.8.

Java documentation for java.util.concurrent.ConcurrentHashMap.reduceToInt(long, java.util.function.ToIntBiFunction<? super K, ? super V>, int, java.util.function.IntBinaryOperator).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to