plus

operator fun <T> Iterable<T>.plus(element: T): List<T>
operator fun <T> Collection<T>.plus(element: T): List<T>

Returns a list containing all elements of the original collection and then the given element.


operator fun <T> Iterable<T>.plus(elements: Array<out T>): List<T>
operator fun <T> Collection<T>.plus(elements: Array<out T>): List<T>

Returns a list containing all elements of the original collection and then all elements of the given elements array.


operator fun <T> Iterable<T>.plus(elements: Iterable<T>): List<T>
operator fun <T> Collection<T>.plus(elements: Iterable<T>): List<T>

Returns a list containing all elements of the original collection and then all elements of the given elements collection.


operator fun <T> Iterable<T>.plus(elements: Sequence<T>): List<T>
operator fun <T> Collection<T>.plus(elements: Sequence<T>): List<T>

Returns a list containing all elements of the original collection and then all elements of the given elements sequence.


operator fun <T> Set<T>.plus(element: T): Set<T>

Returns a set containing all elements of the original set and then the given element if it isn't already in this set.

The returned set preserves the element iteration order of the original set.


operator fun <T> Set<T>.plus(elements: Array<out T>): Set<T>

Returns a set containing all elements of the original set and the given elements array, which aren't already in this set.

The returned set preserves the element iteration order of the original set.


operator fun <T> Set<T>.plus(elements: Iterable<T>): Set<T>

Returns a set containing all elements of the original set and the given elements collection, which aren't already in this set. The returned set preserves the element iteration order of the original set.


operator fun <T> Set<T>.plus(elements: Sequence<T>): Set<T>

Returns a set containing all elements of the original set and the given elements sequence, which aren't already in this set.

The returned set preserves the element iteration order of the original set.


inline operator fun UIntArray.plus(element: UInt): UIntArray
inline operator fun ULongArray.plus(element: ULong): ULongArray
inline operator fun UByteArray.plus(element: UByte): UByteArray
inline operator fun UShortArray.plus(element: UShort): UShortArray

Returns an array containing all elements of the original array and then the given element.

Since Kotlin

1.3

operator fun UIntArray.plus(elements: Collection<UInt>): UIntArray
operator fun ULongArray.plus(elements: Collection<ULong>): ULongArray
operator fun UByteArray.plus(elements: Collection<UByte>): UByteArray
operator fun UShortArray.plus(elements: Collection<UShort>): UShortArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.

Since Kotlin

1.3

inline operator fun UIntArray.plus(elements: UIntArray): UIntArray
inline operator fun ULongArray.plus(elements: ULongArray): ULongArray
inline operator fun UByteArray.plus(elements: UByteArray): UByteArray
inline operator fun UShortArray.plus(elements: UShortArray): UShortArray

Returns an array containing all elements of the original array and then all elements of the given elements array.

Since Kotlin

1.3

operator fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V>

Creates a new read-only map by replacing or adding an entry to this map from a given key-value pair.

The returned map preserves the entry iteration order of the original map. The pair is iterated in the end if it has a unique key.


operator fun <K, V> Map<out K, V>.plus(pairs: Iterable<Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given collection of key-value pairs.

The returned map preserves the entry iteration order of the original map. Those pairs with unique keys are iterated in the end in the order of pairs collection.


operator fun <K, V> Map<out K, V>.plus(pairs: Array<out Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given array of key-value pairs.

The returned map preserves the entry iteration order of the original map. Those pairs with unique keys are iterated in the end in the order of pairs array.


operator fun <K, V> Map<out K, V>.plus(pairs: Sequence<Pair<K, V>>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from a given sequence of key-value pairs.

The returned map preserves the entry iteration order of the original map. Those pairs with unique keys are iterated in the end in the order of pairs sequence.


operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V>

Creates a new read-only map by replacing or adding entries to this map from another map.

The returned map preserves the entry iteration order of the original map. Those entries of another map that are missing in this map are iterated in the end in the order of that map.


expect operator fun <T> Array<T>.plus(element: T): Array<T>
expect operator fun ByteArray.plus(element: Byte): ByteArray
expect operator fun ShortArray.plus(element: Short): ShortArray
expect operator fun IntArray.plus(element: Int): IntArray
expect operator fun LongArray.plus(element: Long): LongArray
expect operator fun FloatArray.plus(element: Float): FloatArray
expect operator fun DoubleArray.plus(element: Double): DoubleArray
expect operator fun BooleanArray.plus(element: Boolean): BooleanArray
expect operator fun CharArray.plus(element: Char): CharArray

Returns an array containing all elements of the original array and then the given element.


expect operator fun <T> Array<T>.plus(elements: Collection<T>): Array<T>
expect operator fun ByteArray.plus(elements: Collection<Byte>): ByteArray
expect operator fun ShortArray.plus(elements: Collection<Short>): ShortArray
expect operator fun IntArray.plus(elements: Collection<Int>): IntArray
expect operator fun LongArray.plus(elements: Collection<Long>): LongArray
expect operator fun FloatArray.plus(elements: Collection<Float>): FloatArray
expect operator fun DoubleArray.plus(elements: Collection<Double>): DoubleArray
expect operator fun BooleanArray.plus(elements: Collection<Boolean>): BooleanArray
expect operator fun CharArray.plus(elements: Collection<Char>): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.


expect operator fun <T> Array<T>.plus(elements: Array<out T>): Array<T>
expect operator fun ByteArray.plus(elements: ByteArray): ByteArray
expect operator fun ShortArray.plus(elements: ShortArray): ShortArray
expect operator fun IntArray.plus(elements: IntArray): IntArray
expect operator fun LongArray.plus(elements: LongArray): LongArray
expect operator fun FloatArray.plus(elements: FloatArray): FloatArray
expect operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray
expect operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray
expect operator fun CharArray.plus(elements: CharArray): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements array.

actual operator fun <T> Array<T>.plus(element: T): Array<T>
actual operator fun ByteArray.plus(element: Byte): ByteArray
actual operator fun ShortArray.plus(element: Short): ShortArray
actual operator fun IntArray.plus(element: Int): IntArray
actual operator fun LongArray.plus(element: Long): LongArray
actual operator fun FloatArray.plus(element: Float): FloatArray
actual operator fun DoubleArray.plus(element: Double): DoubleArray
actual operator fun BooleanArray.plus(element: Boolean): BooleanArray
actual operator fun CharArray.plus(element: Char): CharArray

Returns an array containing all elements of the original array and then the given element.


actual operator fun <T> Array<T>.plus(elements: Collection<T>): Array<T>
actual operator fun ByteArray.plus(elements: Collection<Byte>): ByteArray
actual operator fun ShortArray.plus(elements: Collection<Short>): ShortArray
actual operator fun IntArray.plus(elements: Collection<Int>): IntArray
actual operator fun LongArray.plus(elements: Collection<Long>): LongArray
actual operator fun FloatArray.plus(elements: Collection<Float>): FloatArray
actual operator fun DoubleArray.plus(elements: Collection<Double>): DoubleArray
actual operator fun BooleanArray.plus(elements: Collection<Boolean>): BooleanArray
actual operator fun CharArray.plus(elements: Collection<Char>): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.


actual operator fun <T> Array<T>.plus(elements: Array<out T>): Array<T>
actual operator fun ByteArray.plus(elements: ByteArray): ByteArray
actual operator fun ShortArray.plus(elements: ShortArray): ShortArray
actual operator fun IntArray.plus(elements: IntArray): IntArray
actual operator fun LongArray.plus(elements: LongArray): LongArray
actual operator fun FloatArray.plus(elements: FloatArray): FloatArray
actual operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray
actual operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray
actual operator fun CharArray.plus(elements: CharArray): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements array.

actual inline operator fun <T> Array<T>.plus(element: T): Array<T>
actual inline operator fun ByteArray.plus(element: Byte): ByteArray
actual inline operator fun ShortArray.plus(element: Short): ShortArray
actual inline operator fun IntArray.plus(element: Int): IntArray
actual inline operator fun LongArray.plus(element: Long): LongArray
actual inline operator fun FloatArray.plus(element: Float): FloatArray
actual inline operator fun DoubleArray.plus(element: Double): DoubleArray
actual inline operator fun BooleanArray.plus(element: Boolean): BooleanArray
actual inline operator fun CharArray.plus(element: Char): CharArray

Returns an array containing all elements of the original array and then the given element.


actual operator fun <T> Array<T>.plus(elements: Collection<T>): Array<T>
actual operator fun ByteArray.plus(elements: Collection<Byte>): ByteArray
actual operator fun ShortArray.plus(elements: Collection<Short>): ShortArray
actual operator fun IntArray.plus(elements: Collection<Int>): IntArray
actual operator fun LongArray.plus(elements: Collection<Long>): LongArray
actual operator fun FloatArray.plus(elements: Collection<Float>): FloatArray
actual operator fun DoubleArray.plus(elements: Collection<Double>): DoubleArray
actual operator fun BooleanArray.plus(elements: Collection<Boolean>): BooleanArray
actual operator fun CharArray.plus(elements: Collection<Char>): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.


actual inline operator fun <T> Array<T>.plus(elements: Array<out T>): Array<T>
actual inline operator fun ByteArray.plus(elements: ByteArray): ByteArray
actual inline operator fun ShortArray.plus(elements: ShortArray): ShortArray
actual inline operator fun IntArray.plus(elements: IntArray): IntArray
actual inline operator fun LongArray.plus(elements: LongArray): LongArray
actual inline operator fun FloatArray.plus(elements: FloatArray): FloatArray
actual inline operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray
actual inline operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray
actual inline operator fun CharArray.plus(elements: CharArray): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements array.

actual operator fun <T> Array<T>.plus(element: T): Array<T>
actual operator fun ByteArray.plus(element: Byte): ByteArray
actual operator fun ShortArray.plus(element: Short): ShortArray
actual operator fun IntArray.plus(element: Int): IntArray
actual operator fun LongArray.plus(element: Long): LongArray
actual operator fun FloatArray.plus(element: Float): FloatArray
actual operator fun DoubleArray.plus(element: Double): DoubleArray
actual operator fun BooleanArray.plus(element: Boolean): BooleanArray
actual operator fun CharArray.plus(element: Char): CharArray

Returns an array containing all elements of the original array and then the given element.


actual operator fun <T> Array<T>.plus(elements: Collection<T>): Array<T>
actual operator fun ByteArray.plus(elements: Collection<Byte>): ByteArray
actual operator fun ShortArray.plus(elements: Collection<Short>): ShortArray
actual operator fun IntArray.plus(elements: Collection<Int>): IntArray
actual operator fun LongArray.plus(elements: Collection<Long>): LongArray
actual operator fun FloatArray.plus(elements: Collection<Float>): FloatArray
actual operator fun DoubleArray.plus(elements: Collection<Double>): DoubleArray
actual operator fun BooleanArray.plus(elements: Collection<Boolean>): BooleanArray
actual operator fun CharArray.plus(elements: Collection<Char>): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.


actual operator fun <T> Array<T>.plus(elements: Array<out T>): Array<T>
actual operator fun ByteArray.plus(elements: ByteArray): ByteArray
actual operator fun ShortArray.plus(elements: ShortArray): ShortArray
actual operator fun IntArray.plus(elements: IntArray): IntArray
actual operator fun LongArray.plus(elements: LongArray): LongArray
actual operator fun FloatArray.plus(elements: FloatArray): FloatArray
actual operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray
actual operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray
actual operator fun CharArray.plus(elements: CharArray): CharArray

Returns an array containing all elements of the original array and then all elements of the given elements array.