Spliterators.AbstractSpliterator.EstimateSize Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the initial size estimate, reduced by splits when it is not MaxValue.
[Android.Runtime.Register("estimateSize", "()J", "GetEstimateSizeHandler", ApiSince=24)]
public virtual long EstimateSize();
[<Android.Runtime.Register("estimateSize", "()J", "GetEstimateSizeHandler", ApiSince=24)>]
abstract member EstimateSize : unit -> int64
override this.EstimateSize : unit -> int64
Returns
The estimated size, or long.MaxValue if the size is infinite, unknown, or too expensive to compute.
Implements
- Attributes
Remarks
The estimate is the estimated number of elements that would be encountered by a complete traversal, or long.MaxValue if the size is infinite, unknown, or too expensive to compute. It must be accurate if the spliterator has the Sized characteristic and has not been partially traversed or split, or if it has the Subsized characteristic and has not been partially traversed. Otherwise, it can be inaccurate. After a split, each resulting estimate must not exceed the estimate before the split. If this spliterator has the Subsized characteristic, the two estimates must add up to the estimate before the split.
Java documentation for java.util.Spliterators.AbstractSpliterator.estimateSize().
Java reference for java.util.Spliterators.AbstractSpliterator.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.