Android 12 Developer Preview is here! Try it out, and give us your feedback!

Predicate

interface Predicate<T : Any!>
androidx.core.util.Predicate

Compat version of java.util.function.Predicate

Summary

Public methods
abstract Boolean
test(t: T)

Evaluates this predicate on the given argument.

Public methods

test

abstract fun test(t: T): Boolean

Evaluates this predicate on the given argument.

Parameters
t T: the input argument
Return
Boolean true if the input argument matches the predicate, otherwise false