isNotEmpty

inline fun <T> Array<out T>.isNotEmpty(): Boolean (source)
inline fun ByteArray.isNotEmpty(): Boolean (source)
inline fun ShortArray.isNotEmpty(): Boolean (source)
inline fun IntArray.isNotEmpty(): Boolean (source)
inline fun LongArray.isNotEmpty(): Boolean (source)
inline fun FloatArray.isNotEmpty(): Boolean (source)
inline fun DoubleArray.isNotEmpty(): Boolean (source)
inline fun BooleanArray.isNotEmpty(): Boolean (source)
inline fun CharArray.isNotEmpty(): Boolean (source)

Returns true if the array is not empty.

inline fun <T> Collection<T>.isNotEmpty(): Boolean (source)

Returns true if the collection is not empty.

import kotlin.test.*

fun main(args: Array<String>) {
//sampleStart
val empty = emptyList<Any>()
println("empty.isNotEmpty() is ${empty.isNotEmpty()}") // false

val collection = listOf('a', 'b', 'c')
println("collection.isNotEmpty() is ${collection.isNotEmpty()}") // true
//sampleEnd
}
inline fun <K, V> Map<out K, V>.isNotEmpty(): Boolean (source)

Returns true if this map is not empty.