# Predicate

Artifact: [androidx.window.extensions.core:core](https://developer.android.com/jetpack/androidx/releases/window-extensions-core) [View Source](https://cs.android.com/search?q=file:androidx/window/extensions/core/util/function/Predicate.java+class:androidx.window.extensions.core.util.function.Predicate) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window-extensions-core#1.0.0)

*** ** * ** ***


```
@FunctionalInterface
public interface Predicate<T>
```

<br />

*** ** * ** ***

Represents a predicate boolean-valued function of one argument. It is used internally to avoid using Java 8 functional interface that leads to desugaring and Proguard shrinking.

| Parameters |
|---|---|
| `<T>` | the type of the input to the predicate |

| See also |
|---|---|
| `https://developer.android.com/reference/java/util/function/Predicate.html` |   |

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/androidx/window/extensions/core/util/function/Predicate#test(T)(T t)` Tests the predicate against a given argument. |

## Public methods

### test

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window-extensions-core#1.0.0)

```
abstract boolean test(T t)
```

Tests the predicate against a given argument.

| Parameters |
|---|---|
| `T t` | the input of the predicate |

| Returns |
|---|---|
| `boolean` | `true` if the input matches the `Predicate`, otherwise, `false` |