kotlin.collections.contains

contains

inline operator fun <K, V> Map<out K, V>.contains(
    key: K
): Boolean

Checks 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.

operator fun <T> Iterable<T>.contains(element: T): Boolean

Returns true if element is found in the collection.

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

Returns true if element is found in the array.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/contains.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部