Instance Method インスタンスメソッド

doesContain(_:)

Returns a Boolean value that indicates whether the receiver contains a given object. 与えられたオブジェクトをレシーバが含んでいるかどうかを指し示すブール値を返します。

Declaration 宣言

func doesContain(_ object: Any) -> Bool

Parameters パラメータ

object

The object to search for in the receiver.

Return Value 戻り値

true if the receiver contains object, otherwise false.

Discussion 解説

Currently, doesContain(_:) messages are never sent to any object from within Cocoa itself.

The default implementation for this method provided by NSObject returns true if the receiver is actually an NSArray object and an indexOfObjectIdentical(to:) message sent to the same object would return something other than NSNotFound.

See Also 参照

Performing comparisons 比較を実行する