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

objects(passingTest:)

Returns a set of objects that pass a test in a given block.

Declaration 宣言

func objects(passingTest predicate: (Any, UnsafeMutablePointer<ObjCBool>) -> Bool) -> Set<AnyHashable>

Parameters パラメータ

predicate

The block to apply to elements in the array. 配列の中の要素に適用されることになるブロック。

The block takes two arguments: ブロックは2つの引数をとります。

obj

The element in the set. 集合の中の要素。

stop 中止

A reference to a Boolean value. The block can set the value to true to stop further processing of the set. The stop argument is an out-only argument. You should only ever set this Boolean to true within the block. あるブール値への参照。ブロックは、値をtrueに設定することで、それ以上の集合の処理を止めることができます。stop引数は、ひとつの退出専用引数です。あなたは、「ブロック」内でこのブールをtrueに設定できるだけであるべきです。

The block returns a Boolean value that indicates whether obj passed the test. この「ブロック」はobjがテストを合格したかどうかを示すブール値を返します。

Return Value 戻り値

An NSSet containing objects that pass the test.

See Also 参照

Accessing Set Members 集合メンバにアクセスする