Megosztás a következőn keresztül:


ICollection.RemoveIf(IPredicate) Method

Definition

Removes all of the elements of this collection that satisfy the given predicate.

[Android.Runtime.Register("removeIf", "(Ljava/util/function/Predicate;)Z", "GetRemoveIf_Ljava_util_function_Predicate_Handler:Java.Util.ICollection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public virtual bool RemoveIf (Java.Util.Functions.IPredicate filter);
[<Android.Runtime.Register("removeIf", "(Ljava/util/function/Predicate;)Z", "GetRemoveIf_Ljava_util_function_Predicate_Handler:Java.Util.ICollection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member RemoveIf : Java.Util.Functions.IPredicate -> bool
override this.RemoveIf : Java.Util.Functions.IPredicate -> bool

Parameters

filter
IPredicate

a predicate which returns true for elements to be removed

Returns

true if any elements were removed

Attributes

Remarks

Removes all of the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.

Added in 1.8.

Java documentation for java.util.Collection.removeIf(java.util.function.Predicate<? super E>).

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