concat

infix inline fun <T> Iterable<T>.concat(other: Iterable<T>): Iterable<T>(source)

Combines two iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in other. The source iterators are not polled until necessary.

Java 8 users: The Stream equivalent of this method is Stream.concat(this, other).

See also


@JvmName(name = "concatMutable")
infix inline fun <T> MutableIterable<T>.concat(other: MutableIterable<T>): MutableIterable<T>(source)

Combines two iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in other. The source iterators are not polled until necessary.

The returned iterable's iterator supports remove when the corresponding input iterator supports it.

Java 8 users: The Stream equivalent of this method is Stream.concat(this, other).

See also


inline fun <T> Iterable<T>.concat(a: Iterable<T>, b: Iterable<T>): Iterable<T>(source)

Combines three iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b. The source iterators are not polled until necessary.

Java 8 users: The Stream equivalent of this method is Stream.concat(this, b, c).

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterable<T>.concat(a: MutableIterable<T>, b: MutableIterable<T>): MutableIterable<T>(source)

Combines three iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b. The source iterators are not polled until necessary.

The returned iterable's iterator supports remove when the corresponding input iterator supports it.

See also


inline fun <T> Iterable<T>.concat(a: Iterable<T>, b: Iterable<T>, c: Iterable<T>): Iterable<T>(source)

Combines four iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b, followed by the elements in c. The source iterators are not polled until necessary.

Java 8 users: The Stream equivalent of this method is Streams.concat(a, b, c, d).

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterable<T>.concat(a: MutableIterable<T>, b: MutableIterable<T>, c: MutableIterable<T>): MutableIterable<T>(source)

Combines four iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b, followed by the elements in c. The source iterators are not polled until necessary.

The returned iterable's iterator supports remove when the corresponding input iterator supports it.

Java 8 users: The Stream equivalent of this method is Streams.concat(a, b, c, d).

See also


inline fun <T> Iterable<T>.concat(vararg iterables: Iterable<T>): Iterable<T>(source)

Combines multiple iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements of each iterable in iterables sequentially. The source iterators are not polled until necessary.

Java 8 users: The Stream equivalent of this method is streamOfStreams.flatMap(...).

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterable<T>.concat(vararg iterables: MutableIterable<T>): MutableIterable<T>(source)

Combines multiple iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements of each iterable in iterables sequentially. The source iterators are not polled until necessary.

The returned iterable's iterator supports remove when the corresponding input iterator supports it.

Java 8 users: The Stream equivalent of this method is streamOfStreams.flatMap(...).

See also


infix inline fun <T> Iterator<T>.concat(other: Iterator<T>): Iterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in other. The source iterators are not polled until necessary.

See also


@JvmName(name = "concatMutable")
infix inline fun <T> MutableIterator<T>.concat(other: MutableIterator<T>): MutableIterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in other. The source iterators are not polled until necessary.

The returned iterator supports remove when the corresponding input iterator supports it.

See also


inline fun <T> Iterator<T>.concat(a: Iterator<T>, b: Iterator<T>): Iterator<T>(source)

Combines three iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in a, followed by the elements in b. The source iterators are not polled until necessary.

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterator<T>.concat(a: MutableIterator<T>, b: MutableIterator<T>): MutableIterator<T>(source)

Combines three iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in a, followed by the elements in b. The source iterators are not polled until necessary.

The returned iterator supports remove when the corresponding input iterator supports it.

See also


inline fun <T> Iterator<T>.concat(a: Iterator<T>, b: Iterator<T>, c: Iterator<T>): Iterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in a, followed by the elements in b, followed by the elements in c. The source iterators are not polled until necessary.

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterator<T>.concat(a: MutableIterator<T>, b: MutableIterator<T>, c: MutableIterator<T>): MutableIterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in a, followed by the elements in b, followed by the elements in c. The source iterators are not polled until necessary.

The returned iterator supports remove when the corresponding input iterator supports it.

See also


inline fun <T> Iterator<T>.concat(vararg iterators: Iterator<T>): Iterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in iterators sequentially. The source iterators are not polled until necessary.

See also


@JvmName(name = "concatMutable")
inline fun <T> MutableIterator<T>.concat(vararg iterators: MutableIterator<T>): MutableIterator<T>(source)

Combines two iterators into a single iterator. The returned iterator iterates across the elements in this, followed by the elements in iterators sequentially. The source iterators are not polled until necessary.

The returned iterator supports remove when the corresponding input iterator supports it.

See also