A splitter (or a split iterator) can be split into more splitters that traverse over disjoint subsets of elements.
- Type Params
- T
type of the elements this splitter traverses
- Companion
- object
Type members
Inherited classlikes
Value members
Abstract methods
Splits the iterator into a sequence of disjunct views.
Splits the iterator into a sequence of disjunct views.
Returns a sequence of split iterators, each iterating over some subset of the elements in the collection. These subsets are disjoint and should be approximately equal in size. These subsets are not empty, unless the iterator is empty in which case this method returns a sequence with a single empty iterator. If the splitter has more than two elements, this method will return two or more splitters.
Implementors are advised to keep this partition relatively small - two splitters are already enough when partitioning the collection, although there may be a few more.
'''Note:''' this method actually invalidates the current splitter.
- Returns
a sequence of disjunct iterators of the collection
Inherited methods
- Inherited from
- IterableOnceOps
- Inherited from
- IterableOnceOps
- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from
- Iterator
- Inherited from
- Iterator
- Inherited from
- IterableOnceOps
Deprecated and Inherited methods
- Deprecated
[Since version 2.13.0]Use foldLeft instead of /:- Inherited from
- IterableOnceOps
- Deprecated
[Since version 2.13.0]Use foldRight instead of :\\- Inherited from
- IterableOnceOps
- Deprecated
[Since version 2.13.0]`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from
- IterableOnceOps
- Deprecated
[Since version 2.13.0]Use `dest ++= coll` instead- Inherited from
- IterableOnceOps
- Deprecated
[Since version 2.13.0]hasDefiniteSize on Iterator is the same as isEmpty- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from
- Iterator
- Deprecated
[Since version 2.13.0]Call scanRight on an Iterable instead.- Inherited from
- Iterator
- Deprecated
[Since version 2.13.0]Iterator.seq always returns the iterator itself- Inherited from
- Iterator
- Deprecated
[Since version 2.13.0]Use .iterator instead of .toIterator- Inherited from
- IterableOnceOps