Home
last modified time | relevance | path

Searched refs:predicate (Results 1 – 25 of 110) sorted by relevance

12345

/frameworks/base/services/permission/java/com/android/server/permission/access/collection/
DListExtensions.kt19 inline fun <T> List<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, element)) { in <lambda>()
28 inline fun <T> List<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, element)) { in anyIndexed()
49 inline fun <T> List<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
51 if (predicate(index, element)) { in noneIndexed()
58 inline fun <T> MutableList<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { in removeAllIndexed()
61 if (predicate(index, element)) { in removeAllIndexed()
69 inline fun <T> MutableList<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { in retainAllIndexed()
72 if (!predicate(index, element)) { in retainAllIndexed()
DArraySetExtensions.kt23 inline fun <T> ArraySet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
25 if (!predicate(index, value)) { in <lambda>()
32 inline fun <T> ArraySet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
34 if (predicate(index, value)) { in anyIndexed()
61 inline fun <T> ArraySet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
63 if (predicate(index, value)) { in noneIndexed()
75 inline fun <T> ArraySet<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { in removeAllIndexed()
78 if (predicate(index, value)) { in removeAllIndexed()
86 inline fun <T> ArraySet<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { in retainAllIndexed()
89 if (!predicate(index, value)) { in retainAllIndexed()
DSparseLongArrayExtensions.kt21 inline fun SparseLongArray.allIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun SparseLongArray.anyIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
68 inline fun SparseLongArray.noneIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { in noneIndexed()
70 if (predicate(index, key, value)) { in noneIndexed()
92 inline fun SparseLongArray.removeAllIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { in removeAllIndexed()
95 if (predicate(index, key, value)) { in removeAllIndexed()
103 inline fun SparseLongArray.retainAllIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { in retainAllIndexed()
106 if (!predicate(index, key, value)) { in retainAllIndexed()
DSparseIntArrayExtensions.kt21 inline fun SparseIntArray.allIndexed(predicate: (Int, Int, Int) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun SparseIntArray.anyIndexed(predicate: (Int, Int, Int) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
68 inline fun SparseIntArray.noneIndexed(predicate: (Int, Int, Int) -> Boolean): Boolean { in noneIndexed()
70 if (predicate(index, key, value)) { in noneIndexed()
92 inline fun SparseIntArray.removeAllIndexed(predicate: (Int, Int, Int) -> Boolean): Boolean { in removeAllIndexed()
95 if (predicate(index, key, value)) { in removeAllIndexed()
103 inline fun SparseIntArray.retainAllIndexed(predicate: (Int, Int, Int) -> Boolean): Boolean { in retainAllIndexed()
106 if (!predicate(index, key, value)) { in retainAllIndexed()
DLongSparseArrayExtensions.kt21 inline fun <T> LongSparseArray<T>.allIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun <T> LongSparseArray<T>.anyIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
68 inline fun <T> LongSparseArray<T>.noneIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in noneIndexed()
70 if (predicate(index, key, value)) { in noneIndexed()
77 inline fun <T> LongSparseArray<T>.removeAllIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in removeAllIndexed()
80 if (predicate(index, key, value)) { in removeAllIndexed()
88 inline fun <T> LongSparseArray<T>.retainAllIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in retainAllIndexed()
91 if (!predicate(index, key, value)) { in retainAllIndexed()
DSparseBooleanArrayExtensions.kt21 inline fun SparseBooleanArray.allIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun SparseBooleanArray.anyIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
68 inline fun SparseBooleanArray.noneIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { in noneIndexed()
70 if (predicate(index, key, value)) { in noneIndexed()
92 inline fun SparseBooleanArray.removeAllIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { in removeAllIndexed()
95 if (predicate(index, key, value)) { in removeAllIndexed()
103 inline fun SparseBooleanArray.retainAllIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { in retainAllIndexed()
106 if (!predicate(index, key, value)) { in retainAllIndexed()
DSparseArrayExtensions.kt21 inline fun <T> SparseArray<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun <T> SparseArray<T>.anyIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
68 inline fun <T> SparseArray<T>.noneIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in noneIndexed()
70 if (predicate(index, key, value)) { in noneIndexed()
77 inline fun <T> SparseArray<T>.removeAllIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in removeAllIndexed()
80 if (predicate(index, key, value)) { in removeAllIndexed()
88 inline fun <T> SparseArray<T>.retainAllIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in retainAllIndexed()
91 if (!predicate(index, key, value)) { in retainAllIndexed()
DArrayMapExtensions.kt21 inline fun <K, V> ArrayMap<K, V>.allIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
30 inline fun <K, V> ArrayMap<K, V>.anyIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in anyIndexed()
32 if (predicate(index, key, value)) { in anyIndexed()
66 inline fun <K, V> ArrayMap<K, V>.noneIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in noneIndexed()
68 if (predicate(index, key, value)) { in noneIndexed()
75 inline fun <K, V> ArrayMap<K, V>.removeAllIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in removeAllIndexed()
78 if (predicate(index, key, value)) { in removeAllIndexed()
86 inline fun <K, V> ArrayMap<K, V>.retainAllIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in retainAllIndexed()
89 if (!predicate(index, key, value)) { in retainAllIndexed()
/frameworks/base/test-runner/src/android/test/suitebuilder/
DTestPredicates.java66 public static <T> Predicate<T> not(Predicate<? super T> predicate) { in not() argument
67 return new NotPredicate<T>(predicate); in not()
71 private final Predicate<? super T> predicate; field in TestPredicates.NotPredicate
73 private NotPredicate(Predicate<? super T> predicate) { in NotPredicate() argument
74 this.predicate = predicate; in NotPredicate()
78 return !predicate.apply(t); in apply()
/frameworks/base/apct-tests/perftests/core/src/android/util/
DArraySetPerfTest.java128 Predicate<Integer> predicate = (i) -> i % 2 == 0; in testRemoveIf_Small_Base() local
142 Predicate<Integer> predicate = (i) -> false; in testRemoveIf_Small_RemoveNothing() local
149 set.removeIf(predicate); in testRemoveIf_Small_RemoveNothing()
157 Predicate<Integer> predicate = (i) -> true; in testRemoveIf_Small_RemoveAll() local
164 set.removeIf(predicate); in testRemoveIf_Small_RemoveAll()
172 Predicate<Integer> predicate = (i) -> i % 2 == 0; in testRemoveIf_Small_RemoveHalf() local
179 set.removeIf(predicate); in testRemoveIf_Small_RemoveHalf()
191 Predicate<Integer> predicate = (i) -> i % 2 == 0; in testRemoveIf_Large_Base() local
205 Predicate<Integer> predicate = (i) -> false; in testRemoveIf_Large_RemoveNothing() local
212 set.removeIf(predicate); in testRemoveIf_Large_RemoveNothing()
[all …]
/frameworks/base/services/permission/java/com/android/server/permission/access/immutable/
DIntSetExtensions.kt19 inline fun IntSet.allIndexed(predicate: (Int, Int) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, element)) { in <lambda>()
28 inline fun IntSet.anyIndexed(predicate: (Int, Int) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, element)) { in anyIndexed()
58 inline fun IntSet.noneIndexed(predicate: (Int, Int) -> Boolean): Boolean { in noneIndexed()
60 if (predicate(index, element)) { in noneIndexed()
DIndexedListExtensions.kt19 inline fun <T> IndexedList<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, element)) { in <lambda>()
28 inline fun <T> IndexedList<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, element)) { in anyIndexed()
55 inline fun <T> IndexedList<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
57 if (predicate(index, element)) { in noneIndexed()
DIndexedListSetExtensions.kt19 inline fun <T> IndexedListSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, element)) { in <lambda>()
28 inline fun <T> IndexedListSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, element)) { in anyIndexed()
55 inline fun <T> IndexedListSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
57 if (predicate(index, element)) { in noneIndexed()
DIndexedSetExtensions.kt25 inline fun <T> IndexedSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
27 if (!predicate(index, element)) { in <lambda>()
34 inline fun <T> IndexedSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
36 if (predicate(index, element)) { in anyIndexed()
61 inline fun <T> IndexedSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
63 if (predicate(index, element)) { in noneIndexed()
DIntReferenceMapExtensions.kt20 predicate: (Int, Int, I) -> Boolean in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
31 predicate: (Int, Int, I) -> Boolean in anyIndexed()
34 if (predicate(index, key, value)) { in anyIndexed()
61 predicate: (Int, Int, I) -> Boolean in noneIndexed()
64 if (predicate(index, key, value)) { in noneIndexed()
DIndexedReferenceMapExtensions.kt20 predicate: (Int, K, I) -> Boolean in <lambda>()
23 if (!predicate(index, key, value)) { in <lambda>()
31 predicate: (Int, K, I) -> Boolean in anyIndexed()
34 if (predicate(index, key, value)) { in anyIndexed()
61 predicate: (Int, K, I) -> Boolean in noneIndexed()
64 if (predicate(index, key, value)) { in noneIndexed()
DIntMapExtensions.kt19 inline fun <T> IntMap<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, key, value)) { in <lambda>()
28 inline fun <T> IntMap<T>.anyIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, key, value)) { in anyIndexed()
67 inline fun <T> IntMap<T>.noneIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in noneIndexed()
69 if (predicate(index, key, value)) { in noneIndexed()
DIndexedMapExtensions.kt19 inline fun <K, V> IndexedMap<K, V>.allIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in <lambda>()
21 if (!predicate(index, key, value)) { in <lambda>()
28 inline fun <K, V> IndexedMap<K, V>.anyIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in anyIndexed()
30 if (predicate(index, key, value)) { in anyIndexed()
67 inline fun <K, V> IndexedMap<K, V>.noneIndexed(predicate: (Int, K, V) -> Boolean): Boolean { in noneIndexed()
69 if (predicate(index, key, value)) { in noneIndexed()
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/
DNotificationListener.kt78 predicate: (StatusBarNotification) -> Boolean in findNotification()
81 return notifications.values.firstOrNull(predicate) in findNotification()
87 predicate: (StatusBarNotification) -> Boolean in waitForNotificationToAppear()
90 return waitForResult(extractor = { it.notifications.values.firstOrNull(predicate) }) in waitForNotificationToAppear()
96 fun waitForNotificationToDisappear(predicate: (StatusBarNotification) -> Boolean): Boolean { in waitForNotificationToDisappear()
97 return instance?.let { wait { it.notifications.values.none(predicate) } } in waitForNotificationToDisappear()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/hardware/
DInputManager.kt47 fun InputManager.findInputDevice(predicate: (InputDevice) -> Boolean): InputDevice? = in findInputDevice()
48 getInputDeviceSequence().find { predicate(it) } in findInputDevice()
59 fun InputManager.hasInputDevice(predicate: (InputDevice) -> Boolean): Boolean = in hasInputDevice()
60 getInputDeviceSequence().any { predicate(it) } in hasInputDevice()
/frameworks/libs/binary_translation/base/include/berberis/base/
Dalgorithm.h48 auto FindIf(const Container& container, Predicate predicate) { in FindIf() argument
49 return std::find_if(container.begin(), container.end(), predicate); in FindIf()
53 bool ContainsIf(const Container& container, Predicate predicate) { in ContainsIf() argument
54 return FindIf(container, predicate) != container.end(); in ContainsIf()
/frameworks/base/tests/SurfaceViewBufferTests/src/com/android/test/
DSurfaceTracingTestBase.kt55 fun withTrace(predicate: (it: MainActivity) -> Unit): LayersTrace { in <lambda>()
58 predicate(it) in <lambda>()
63 fun withTrace(predicate: () -> Unit): LayersTrace { in <lambda>()
65 predicate() in <lambda>()
69 fun runOnUiThread(predicate: (it: MainActivity) -> Unit) { in <lambda>()
71 predicate(it) in <lambda>()
DScreenRecordTestBase.kt59 fun runOnUiThread(predicate: (it: MainActivity) -> Unit) { in runOnUiThread()
61 predicate(mActivity) in runOnUiThread()
68 predicate: (it: MainActivity) -> Unit in withScreenRecording()
73 predicate(mActivity) in withScreenRecording()
/frameworks/base/core/java/com/android/internal/util/
DCollectionUtils.java64 java.util.function.Predicate<? super T> predicate) { in filter() argument
68 if (predicate.test(item)) { in filter()
79 java.util.function.Predicate<? super T> predicate) { in filter() argument
87 if (predicate.test(item)) { in filter()
93 if (predicate.test(item)) { in filter()
103 @Nullable Predicate<? super T> predicate) { in addIf() argument
106 if (predicate.test(item)) { in addIf()
258 java.util.function.Predicate<T> predicate) { in any() argument
259 return find(items, predicate) != null; in any()
267 java.util.function.Predicate<T> predicate) { in any() argument
[all …]
/frameworks/native/services/surfaceflinger/tests/utils/
DWindowInfosListenerUtils.h36 bool waitForWindowInfosPredicate(const WindowInfosPredicate& predicate) { in waitForWindowInfosPredicate() argument
38 auto listener = sp<WindowInfosListener>::make(std::move(predicate), promise); in waitForWindowInfosPredicate()
60 WindowInfosListener(WindowInfosPredicate predicate, std::promise<void>& promise) in WindowInfosListener()
61 : mPredicate(std::move(predicate)), mPromise(promise) {} in WindowInfosListener()

12345