# Predicate

added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated since[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# Predicate

`
public


interface
Predicate
`  
`


`

|------------------------------------------|
| com.android.internal.util.Predicate\<T\> |

<br />

*** ** * ** ***

<br />

**This interface was deprecated in API level 26.**   
Use`java.util.function.Predicate`instead. This must not be used outside frameworks/base/test-runner.

A Predicate can determine a true or false value for any input of its parameterized type. For example, a`RegexPredicate`might implement`Predicate<String>`, and return true for any String that matches its given regular expression.

<br />

<br />

Implementors of Predicate which may cause side effects upon evaluation are strongly encouraged to state this fact clearly in their API documentation.

<br />

## Summary

|                                                      ### Public methods                                                       ||
|---------------------|----------------------------------------------------------------------------------------------------------|
| ` abstract boolean` | ` `[apply](https://developer.android.com/reference/com/android/internal/util/Predicate#apply(T))`(T t) ` |

## Public methods

### apply

added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
boolean apply (T t)
```

<br />

<br />

|   Parameters    ||
|-----|------------|
| `t` | `T` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

-

  ## Interfaces

  - DumpUtils.Dump
  - FileRotator.Reader
  - FileRotator.Rewriter
  - FileRotator.Writer
  - FunctionalUtils.RemoteExceptionIgnoringConsumer
  - FunctionalUtils.ThrowingConsumer
  - FunctionalUtils.ThrowingRunnable
  - FunctionalUtils.ThrowingSupplier
  - [Predicate](https://developer.android.com/reference/com/android/internal/util/Predicate)
-

  ## Classes

  - ArrayUtils
  - AsyncChannel
  - AsyncService
  - AsyncService.AsyncServiceInfo
  - BitwiseInputStream
  - BitwiseOutputStream
  - CallbackRegistry
  - CharSequences
  - CollectionUtils
  - DumpUtils
  - ExponentiallyBucketedHistogram
  - FastMath
  - FastPrintWriter
  - FastXmlSerializer
  - FileRotator
  - FunctionalUtils
  - HexDump
  - IndentingPrintWriter
  - JournaledFile
  - LatencyTracker
  - LineBreakBufferedWriter
  - MessageUtils
  - MimeIconUtils
  - NotificationMessagingUtil
  - Preconditions
  - ProcFileReader
  - ScreenshotHelper
  - SizedInputStream
  - TypedProperties
  - UserIcons
  - VirtualRefBasePtr
-

  ## Exceptions

  - TypedProperties.ParseException
  - TypedProperties.TypeException
-

  ## Errors

  - MessageUtils.DuplicateConstantError