ConcatIterator
Basically a fast, efficient .flatten
or mkString
for nested iterators
For some reason, the default way of concatenation e.g.
val middle = first ++ lastChildIter ++ sep ++ remaining
Was throwing weird NullPointerExceptions I couldn't figure out =(
Also, ++ didn't seem to be sufficiently lazy, so it was forcing
things earlier than it really needed to. It isn't documented anywhere
how lazy it's meant to be, whereas ConcatIterator
here is obviously
lazy and won't even evaluate each iterator until you ask it to
trait Iterator[T]
trait IterableOnceOps[T, Iterator, Iterator[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any
Type members
Inherited classlikes
Value members
Inherited methods
@deprecatedOverriding(message = "This should always forward to the 3-arg version of this method", since = "2.13.4")
- Inherited from:
- IterableOnceOps
@deprecatedOverriding(message = "This should always forward to the 3-arg version of this method", since = "2.13.4")
- Inherited from:
- IterableOnceOps
@deprecatedOverriding(message = "isEmpty is defined as !hasNext; override hasNext instead", since = "2.13.0")
- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from:
- Iterator
@deprecatedOverriding(message = "nonEmpty is defined as !isEmpty; override isEmpty instead", since = "2.13.0")
- Inherited from:
- IterableOnceOps
Deprecated and Inherited methods
@inline @deprecated(message = "Use foldLeft instead of /:", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Use foldLeft instead of /:- Inherited from:
- IterableOnceOps
@inline @deprecated(message = "Use foldRight instead of :\\", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Use foldRight instead of :\\- Inherited from:
- IterableOnceOps
@deprecated(message = "`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from:
- IterableOnceOps
@inline @deprecated(message = "Use `dest ++= coll` instead", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Use `dest ++= coll` instead- Inherited from:
- IterableOnceOps
@inline @deprecated(message = "hasDefiniteSize on Iterator is the same as isEmpty", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
hasDefiniteSize on Iterator is the same as isEmpty- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from:
- Iterator
@deprecated(message = "Call scanRight on an Iterable instead.", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Call scanRight on an Iterable instead.- Inherited from:
- Iterator
@deprecated(message = "Iterator.seq always returns the iterator itself", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Iterator.seq always returns the iterator itself- Inherited from:
- Iterator
@inline @deprecated(message = "Use .iterator instead of .toIterator", since = "2.13.0")
- Deprecated
[Since version 2.13.0]
Use .iterator instead of .toIterator- Inherited from:
- IterableOnceOps