Collectors.Counting Method

Definition

Returns a Collector accepting elements of type T that counts the number of input elements.

[Android.Runtime.Register("counting", "()Ljava/util/stream/Collector;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Streams.ICollector? Counting ();
[<Android.Runtime.Register("counting", "()Ljava/util/stream/Collector;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Counting : unit -> Java.Util.Streams.ICollector

Returns

a Collector that counts the input elements

Attributes

Remarks

Returns a Collector accepting elements of type T that counts the number of input elements. If no elements are present, the result is 0.

Java documentation for java.util.stream.Collectors.counting().

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