Udostępnij za pośrednictwem


Collectors.SummingLong(IToLongFunction) Method

Definition

Returns a Collector that produces the sum of a long-valued function applied to the input elements.

[Android.Runtime.Register("summingLong", "(Ljava/util/function/ToLongFunction;)Ljava/util/stream/Collector;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Streams.ICollector? SummingLong (Java.Util.Functions.IToLongFunction? mapper);
[<Android.Runtime.Register("summingLong", "(Ljava/util/function/ToLongFunction;)Ljava/util/stream/Collector;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member SummingLong : Java.Util.Functions.IToLongFunction -> Java.Util.Streams.ICollector

Parameters

mapper
IToLongFunction

a function extracting the property to be summed

Returns

a Collector that produces the sum of a derived property

Attributes

Remarks

Returns a Collector that produces the sum of a long-valued function applied to the input elements. If no elements are present, the result is 0.

Java documentation for java.util.stream.Collectors.summingLong(java.util.function.ToLongFunction<? super T>).

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