gradle
8.4

# filter

@Incubating
abstract fun filter(predicate: Predicate<out Any>): Provider<T>(source)

Returns a new Provider with the value of this provider if the passed predicate is true and no value otherwise.

The resulting provider will be live, so that each time it is queried, it queries the original (this) provider and applies the predicate to the result. Whenever the original provider has no value, the new provider will also have no value and the predicate will not be called.

#### Parameters

predicate

The predicate to apply to test value.