T
- public interface AddressComponentSpliterator<T extends AddressComponentRange> extends AddressComponentRangeSpliterator<T,T>
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
Modifier and Type | Method and Description |
---|---|
AddressComponentSpliterator<T> |
trySplit()
If this spliterator can be partitioned, returns a Spliterator
covering elements, that will, upon return from this method, not
be covered by this Spliterator.
|
getAddressItem, getComparator, getSize
characteristics, estimateSize, forEachRemaining, getExactSizeIfKnown, hasCharacteristics, tryAdvance
AddressComponentSpliterator<T> trySplit()
AddressComponentRangeSpliterator
The returned Spliterator will cover a strict prefix of the elements, preserving the ordering of the address items.
Repeated calls to trySplit()
will eventually return null
.
Upon non-null return, the sizes of the new spliterator and this spliterator as given by AddressComponentRangeSpliterator.getSize()
will add up to the size of this spliterator before splitting.
The remaining elements of segment spliterators will be divided exactly in half.
Other address item spliterators divide the original address item roughly in half, not the remaining elements.
Because the original address item is divided instead of dividing the remaining elements,
the resulting spliterators will not be roughly equal in size if
a disproportionate amount of traversing using Spliterator.tryAdvance(java.util.function.Consumer)
occurred before splitting.
In fact, the splitting will not happen at all if half the elements
have already been traversed.
trySplit
in interface AddressComponentRangeSpliterator<T extends AddressComponentRange,T extends AddressComponentRange>
trySplit
in interface Spliterator<T extends AddressComponentRange>
Spliterator
covering some portion of the
elements, or null
if this spliterator cannot be split