语言

IntentFilter.AsPredicate 方法

定义

返回一个 Predicate 测试此筛选器是否与给定 意向匹配。

[Android.Runtime.Register("asPredicate", "()Ljava/util/function/Predicate;", "GetAsPredicateHandler", ApiSince=33)]
public virtual Java.Util.Functions.IPredicate AsPredicate();
[<Android.Runtime.Register("asPredicate", "()Ljava/util/function/Predicate;", "GetAsPredicateHandler", ApiSince=33)>]
abstract member AsPredicate : unit -> Java.Util.Functions.IPredicate
override this.AsPredicate : unit -> Java.Util.Functions.IPredicate

返回

此值不能为 null。

特性

注解

返回一个 Predicate 测试此筛选器是否与给定 意向匹配。

意向的类型将始终使用简单的 Intent#getType() 检查进行测试。 若要在匹配之前执行详细的类型解析,请使用 #asPredicateWithTypeResolution(ContentResolver)。

Java文档android.content.IntentFilter.asPredicate()。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于