plusElement

inline fun <T> Iterable<T>.plusElement(element: T): List<T>(source)
inline fun <T> Collection<T>.plusElement(element: T): List<T>(source)

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

Since Kotlin

1.0

inline fun <T> Set<T>.plusElement(element: T): Set<T>(source)

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.

Since Kotlin

1.0

expect fun <T> Array<T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.0
inline fun <T> Array<out T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.1
actual inline fun <T> Array<T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.0
actual inline fun <T> Array<T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.3
actual inline fun <T> Array<T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.8
actual inline fun <T> Array<T>.plusElement(element: T): Array<T>(source)

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

Since Kotlin

1.8