Share via


ArraySet.RetainAll(ICollection) Method

Definition

Remove all values in the array set that do <b>not</b> exist in the given collection.

[Android.Runtime.Register("retainAll", "(Ljava/util/Collection;)Z", "", ApiSince=23)]
public bool RetainAll (System.Collections.ICollection? collection);
[<Android.Runtime.Register("retainAll", "(Ljava/util/Collection;)Z", "", ApiSince=23)>]
abstract member RetainAll : System.Collections.ICollection -> bool
override this.RetainAll : System.Collections.ICollection -> bool

Parameters

collection
ICollection

The collection whose contents are to be used to determine which values to keep.

Returns

Returns true if any values were removed from the array set, else false.

Implements

Attributes

Remarks

Remove all values in the array set that do <b>not</b> exist in the given collection.

Java documentation for android.util.ArraySet.retainAll(java.util.Collection<?>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to