次の方法で共有


ConcurrentHashMap.ReduceEntriesToInt Method

Definition

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

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

Parameters

parallelismThreshold
Int64

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

transformer
IToIntFunction

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 entries

Attributes

Remarks

Returns the result of accumulating the given transformation of all entries 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.reduceEntriesToInt(long, java.util.function.ToIntFunction<java.util.Map.Entry<K, 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