Stay organized with collections
Save and categorize content based on your preferences.
Predicate
public
interface
Predicate
com.android.internal.util.Predicate<T>
|
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.
Implementors of Predicate which may cause side effects upon evaluation are
strongly encouraged to state this fact clearly in their API documentation.
Summary
Public methods |
abstract
boolean
|
apply(T t)
|
Public methods
apply
boolean apply (T t)
Interfaces
- DumpUtils.Dump
- FileRotator.Reader
- FileRotator.Rewriter
- FileRotator.Writer
- FunctionalUtils.RemoteExceptionIgnoringConsumer
- FunctionalUtils.ThrowingConsumer
- FunctionalUtils.ThrowingRunnable
- FunctionalUtils.ThrowingSupplier
- 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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Predicate\n\nadded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated since [API level\n26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nPredicate\n=========\n\n\n`\npublic\n\n\ninterface\nPredicate\n`\n\n\n`\n\n\n`\n\n|------------------------------------------|\n| com.android.internal.util.Predicate\\\u003cT\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 26.** \n\nUse `java.util.function.Predicate` instead.\nThis must not be used outside frameworks/base/test-runner.\n\nA Predicate can determine a true or false value for any input of its\nparameterized type. For example, a `RegexPredicate` might implement\n`Predicate\u003cString\u003e`, and return true for any String that matches its\ngiven regular expression.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nImplementors of Predicate which may cause side effects upon evaluation are strongly encouraged to state this fact clearly in their API documentation.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|-----------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[apply](/reference/com/android/internal/util/Predicate#apply(T))`(T t) ` |\n\nPublic methods\n--------------\n\n### apply\n\nadded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\nboolean apply (T t)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----|------------|\n| `t` | `T` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - DumpUtils.Dump\n - FileRotator.Reader\n - FileRotator.Rewriter\n - FileRotator.Writer\n - FunctionalUtils.RemoteExceptionIgnoringConsumer\n - FunctionalUtils.ThrowingConsumer\n - FunctionalUtils.ThrowingRunnable\n - FunctionalUtils.ThrowingSupplier\n - [Predicate](/reference/com/android/internal/util/Predicate)\n-\n\n Classes\n -------\n\n - ArrayUtils\n - AsyncChannel\n - AsyncService\n - AsyncService.AsyncServiceInfo\n - BitwiseInputStream\n - BitwiseOutputStream\n - CallbackRegistry\n - CharSequences\n - CollectionUtils\n - DumpUtils\n - ExponentiallyBucketedHistogram\n - FastMath\n - FastPrintWriter\n - FastXmlSerializer\n - FileRotator\n - FunctionalUtils\n - HexDump\n - IndentingPrintWriter\n - JournaledFile\n - LatencyTracker\n - LineBreakBufferedWriter\n - MessageUtils\n - MimeIconUtils\n - NotificationMessagingUtil\n - Preconditions\n - ProcFileReader\n - ScreenshotHelper\n - SizedInputStream\n - TypedProperties\n - UserIcons\n - VirtualRefBasePtr\n-\n\n Exceptions\n ----------\n\n - TypedProperties.ParseException\n - TypedProperties.TypeException\n-\n\n Errors\n ------\n\n - MessageUtils.DuplicateConstantError"]]