OfPrimitive
Base interface for Spliterators specialized for primitive values.
Type Parameters
The wrapper type (e.g., Int, Long, Double).
The primitive consumer function type (e.g., (Int) -> Unit).
The concrete primitive Spliterator type (e.g., OfInt).
Inheritors
Functions
Returns a set of characteristics of this Spliterator and its elements. The result is represented as ORed values from the constants defined in the companion object (ORDERED, DISTINCT, etc.).
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.
Primitive-specific version of forEachRemaining.
Generic forEachRemaining implementation for primitive spliterators. Default behavior adapts the generic consumer to the primitive one, potentially causing boxing.
If SORTED by a Comparator, returns that Comparator. If SORTED in natural order, returns null. Otherwise (not SORTED), throws IllegalStateException.
Convenience method returning estimateSize if SIZED, else -1L.
Returns true if this Spliterator's characteristics contain all of the given characteristics.
Primitive-specific version of tryAdvance.
Generic tryAdvance implementation for primitive spliterators. Default behavior adapts the generic consumer to the primitive one, potentially causing boxing.