estimateSize

abstract fun estimateSize(): Long

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

See Java documentation for accuracy requirements based on characteristics like SIZED and SUBSIZED.

Return

The estimated size, or Long.MAX_VALUE.