ISpliterator.EstimateSize Method

Definition

Returns an estimate of the number of elements that would be encountered by a #forEachRemaining traversal, or returns Long#MAX_VALUE if infinite, unknown, or too expensive to compute.

[Android.Runtime.Register("estimateSize", "()J", "GetEstimateSizeHandler:Java.Util.ISpliteratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public long EstimateSize ();
[<Android.Runtime.Register("estimateSize", "()J", "GetEstimateSizeHandler:Java.Util.ISpliteratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member EstimateSize : unit -> int64

Returns

the estimated size, or Long.MAX_VALUE if infinite, unknown, or too expensive to compute.

Attributes

Remarks

Returns an estimate of the number of elements that would be encountered by a #forEachRemaining traversal, or returns Long#MAX_VALUE if infinite, unknown, or too expensive to compute.

If this Spliterator is #SIZED and has not yet been partially traversed or split, or this Spliterator is #SUBSIZED and has not yet been partially traversed, this estimate must be an accurate count of elements that would be encountered by a complete traversal. Otherwise, this estimate may be arbitrarily inaccurate, but must decrease as specified across invocations of #trySplit.

Java documentation for java.util.Spliterator.estimateSize().

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