contains
operator fun ByteArray.contains(element: Byte): Booleanoperator fun ShortArray.contains(element: Short): Booleanoperator fun IntArray.contains(element: Int): Booleanoperator fun LongArray.contains(element: Long): Booleanoperator fun FloatArray.contains(element: Float): Booleanoperator fun DoubleArray.contains(element: Double): Booleanoperator fun BooleanArray.contains(element: Boolean): Booleanoperator fun CharArray.contains(element: Char): BooleanReturns true if element is found in the array.
operator fun <T> Iterable<T>.contains(element: T): BooleanReturns true if element is found in the collection.
operator fun <K, V> Map<out K, V>.contains(key: K): BooleanChecks if the map contains the given key.
This method allows to use the x in map syntax for checking whether an object is contained in the map.