Home
last modified time | relevance | path

Searched refs:E (Results 1 – 25 of 266) sorted by relevance

1234567891011

/frameworks/native/include/ftl/
Denum.h32 template <typename E, E V>
34 static_assert(std::is_enum_v<E>); in ftl_enum()
95 template <typename E, typename = std::enable_if_t<std::is_enum_v<E>>>
96 constexpr auto to_underlying(E v) {
97 return static_cast<std::underlying_type_t<E>>(v);
118 template <typename E, typename = void>
120 static_assert(is_scoped_enum_v<E>, "Missing ftl_first enumerator");
121 static constexpr E value{0};
124 template <typename E>
125 struct enum_begin<E, std::void_t<decltype(E::ftl_first)>> {
[all …]
/frameworks/base/core/java/com/google/android/collect/
DSets.java70 public static <E> HashSet<E> newHashSet(E... elements) { in newHashSet()
72 HashSet<E> set = new HashSet<E>(capacity); in newHashSet()
83 public static <E> SortedSet<E> newSortedSet() { in newSortedSet()
84 return new TreeSet<E>(); in newSortedSet()
94 public static <E> SortedSet<E> newSortedSet(E... elements) { in newSortedSet()
95 SortedSet<E> set = new TreeSet<E>(); in newSortedSet()
104 public static <E> ArraySet<E> newArraySet() { in newArraySet()
105 return new ArraySet<E>(); in newArraySet()
112 public static <E> ArraySet<E> newArraySet(E... elements) { in newArraySet()
114 ArraySet<E> set = new ArraySet<E>(capacity); in newArraySet()
DLists.java39 public static <E> ArrayList<E> newArrayList() { in newArrayList()
40 return new ArrayList<E>(); in newArrayList()
62 public static <E> ArrayList<E> newArrayList(E... elements) { in newArrayList()
64 ArrayList<E> list = new ArrayList<E>(capacity); in newArrayList()
/frameworks/base/core/java/com/android/internal/app/
DProcessMap.java22 public class ProcessMap<E> {
23 final ArrayMap<String, SparseArray<E>> mMap
24 = new ArrayMap<String, SparseArray<E>>();
26 public E get(String name, int uid) { in get()
27 SparseArray<E> uids = mMap.get(name); in get()
32 public E put(String name, int uid, E value) { in put()
33 SparseArray<E> uids = mMap.get(name); in put()
35 uids = new SparseArray<E>(2); in put()
42 public E remove(String name, int uid) { in remove()
43 SparseArray<E> uids = mMap.get(name); in remove()
[all …]
/frameworks/base/services/core/java/com/android/server/utils/
DWatchedLongSparseArray.java30 public class WatchedLongSparseArray<E> extends WatchableImpl
34 private final LongSparseArray<E> mStorage;
85 if (mStorage.indexOfValue((E) o) == -1) { in unregisterChildIf()
146 public WatchedLongSparseArray(@NonNull LongSparseArray<E> c) { in WatchedLongSparseArray()
153 public WatchedLongSparseArray(@NonNull WatchedLongSparseArray<E> r) { in WatchedLongSparseArray()
160 public void copyFrom(@NonNull LongSparseArray<E> src) { in copyFrom()
171 public void copyTo(@NonNull LongSparseArray<E> dst) { in copyTo()
183 public LongSparseArray<E> untrackedStorage() { in untrackedStorage()
191 public E get(long key) { in get()
199 public E get(long key, E valueIfKeyNotFound) { in get()
[all …]
DWatchedSparseArray.java32 public class WatchedSparseArray<E> extends WatchableImpl
36 private final SparseArray<E> mStorage;
87 if (mStorage.indexOfValue((E) o) == -1) { in unregisterChildIf()
148 public WatchedSparseArray(@NonNull SparseArray<E> c) { in WatchedSparseArray()
155 public WatchedSparseArray(@NonNull WatchedSparseArray<E> r) { in WatchedSparseArray()
162 public void copyFrom(@NonNull SparseArray<E> src) { in copyFrom()
173 public void copyTo(@NonNull SparseArray<E> dst) { in copyTo()
185 public SparseArray<E> untrackedStorage() { in untrackedStorage()
204 public E get(int key) { in get()
212 public E get(int key, E valueIfKeyNotFound) { in get()
[all …]
DWatchedArrayList.java31 public class WatchedArrayList<E> extends WatchableImpl
35 private final ArrayList<E> mStorage;
140 mStorage = new ArrayList<E>(capacity); in WatchedArrayList()
146 public WatchedArrayList(@Nullable Collection<? extends E> c) { in WatchedArrayList()
147 mStorage = new ArrayList<E>(); in WatchedArrayList()
158 public WatchedArrayList(@NonNull ArrayList<E> c) { in WatchedArrayList()
165 public WatchedArrayList(@NonNull WatchedArrayList<E> c) { in WatchedArrayList()
172 public void copyFrom(@NonNull ArrayList<E> src) { in copyFrom()
184 public void copyTo(@NonNull ArrayList<E> dst) { in copyTo()
197 public ArrayList<E> untrackedStorage() { in untrackedStorage()
[all …]
DWatchedArraySet.java31 public class WatchedArraySet<E> extends WatchableImpl
35 private final ArraySet<E> mStorage;
145 mStorage = new ArraySet<E>(capacity, identityHashCode); in WatchedArraySet()
151 public WatchedArraySet(@Nullable E[] array) { in WatchedArraySet()
158 public WatchedArraySet(@NonNull ArraySet<E> c) { in WatchedArraySet()
165 public WatchedArraySet(@NonNull WatchedArraySet<E> c) { in WatchedArraySet()
172 public void copyFrom(@NonNull ArraySet<E> src) { in copyFrom()
184 public void copyTo(@NonNull ArraySet<E> dst) { in copyTo()
197 public ArraySet<E> untrackedStorage() { in untrackedStorage()
247 public E valueAt(int index) { in valueAt()
[all …]
DSnapshots.java51 public static <E> void copy(@NonNull SparseArray<E> dst, @NonNull SparseArray<E> src) { in copy()
68 public static <E> void copy(@NonNull SparseSetArray<E> dst, @NonNull SparseSetArray<E> src) { in copy()
103 public static <E extends Snappable<E>> void snapshot(@NonNull SparseArray<E> dst, in snapshot()
104 @NonNull SparseArray<E> src) { in snapshot()
120 public static <E extends Snappable<E>> void snapshot(@NonNull SparseSetArray<E> dst, in snapshot()
121 @NonNull SparseSetArray<E> src) { in snapshot()
/frameworks/libs/net/common/testutils/hostdevice/com/android/net/module/util/
DTrackRecord.kt29 interface TrackRecord<E> : List<E> {
34 fun add(e: E): Boolean in add()
46 fun poll(timeoutMs: Long, pos: Int, predicate: (E) -> Boolean = { true }): E? in add()
55 class ArrayTrackRecord<E> : TrackRecord<E> {
59 private val elements = ArrayList<E>()
64 class ArrayTrackRecordIterator<E>(
65 private val list: ArrayList<E>,
68 ) : ListIterator<E> {
80 override fun contains(element: E) = lock.withLock { elements.contains(element) } in <lambda>()
81 override fun containsAll(elements: Collection<E>) = lock.withLock { in <lambda>()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DUidProcessMap.java27 public class UidProcessMap<E> {
28 final SparseArray<ArrayMap<String, E>> mMap = new SparseArray<>();
33 public E get(int uid, String name) { in get()
34 final ArrayMap<String, E> names = mMap.get(uid); in get()
44 public E put(int uid, String name, E value) { in put()
45 ArrayMap<String, E> names = mMap.get(uid); in put()
47 names = new ArrayMap<String, E>(2); in put()
57 public E remove(int uid, String name) { in remove()
62 final ArrayMap<String, E> names = mMap.valueAt(index); in remove()
64 final E old = names.remove(name); in remove()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DNamedListenerSet.kt33 class NamedListenerSet<E : Any>( in <lambda>()
34 private val getName: (E) -> String = { it.javaClass.name }, in <lambda>()
35 ) : IListenerSet<E> {
43 override fun iterator(): Iterator<E> = iterator { in isEmpty()
47 override fun containsAll(elements: Collection<E>) = in containsAll()
50 override fun contains(element: E) = listeners.firstOrNull { it.listener == element } != null in <lambda>()
52 override fun addIfAbsent(element: E): Boolean = listeners.addIfAbsent(NamedListener(element)) in addIfAbsent()
54 override fun remove(element: E): Boolean = listeners.removeIf { it.listener == element } in addIfAbsent()
57 inner class NamedListener(val listener: E) {
75 inline fun forEachNamed(block: (String, E) -> Unit) = in forEachNamed()
[all …]
DListenerSet.kt29 class ListenerSet<E : Any>
31 private constructor(private val listeners: CopyOnWriteArrayList<E>) :
32 Collection<E> by listeners, IListenerSet<E> {
37 override fun addIfAbsent(element: E): Boolean = listeners.addIfAbsent(element)
39 override fun remove(element: E): Boolean = listeners.remove(element)
/frameworks/base/core/java/android/view/accessibility/
DWeakSparseArray.java26 final class WeakSparseArray<E> {
28 private final ReferenceQueue<E> mRefQueue = new ReferenceQueue<>();
29 private final SparseArray<WeakReferenceWithId<E>> mSparseArray = new SparseArray<>();
31 public void append(int key, E value) { in append()
41 public E get(int key) { in get()
43 WeakReferenceWithId<E> ref = mSparseArray.get(key); in get()
53 private static class WeakReferenceWithId<E> extends WeakReference<E> {
57 WeakReferenceWithId(E referent, ReferenceQueue<? super E> q, int id) { in WeakReferenceWithId()
/frameworks/base/services/core/java/com/android/server/textclassifier/
DFixedSizeQueue.java37 public final class FixedSizeQueue<E> {
39 private final Queue<E> mDelegate;
42 private final OnEntryEvictedListener<E> mOnEntryEvictedListener;
46 public FixedSizeQueue(int maxSize, @Nullable OnEntryEvictedListener<E> onEntryEvictedListener) { in FixedSizeQueue()
59 public boolean add(@NonNull E element) { in add()
62 E removed = mDelegate.remove(); in add()
75 public E poll() { in poll()
82 public boolean remove(@NonNull E element) { in remove()
97 public interface OnEntryEvictedListener<E> {
101 void onEntryEvicted(@NonNull E element); in onEntryEvicted()
/frameworks/base/services/core/java/com/android/server/hdmi/
DUnmodifiableSparseArray.java24 final class UnmodifiableSparseArray<E> {
27 private final SparseArray<E> mArray;
29 public UnmodifiableSparseArray(SparseArray<E> array) { in UnmodifiableSparseArray()
37 public E get(int key) { in get()
41 public E get(int key, E valueIfKeyNotFound) { in get()
49 public E valueAt(int index) { in valueAt()
53 public int indexOfValue(E value) { in indexOfValue()
/frameworks/base/libs/hwui/utils/
DResult.h24 template <typename E>
26 E error;
29 template <typename R, typename E>
34 Result(Error<E>&& error) : result(std::forward<Error<E>>(error)) {} in Result()
45 E error() const { in error()
47 return std::get<Error<E>>(result).error; in error()
51 std::variant<R, Error<E>> result;
/frameworks/base/core/java/android/util/
DSparseArray.java59 public class SparseArray<E> implements Cloneable {
97 public SparseArray<E> clone() { in clone()
98 SparseArray<E> clone = null; in clone()
100 clone = (SparseArray<E>) super.clone(); in clone()
124 public E get(int key) { in get()
133 public E get(int key, E valueIfKeyNotFound) { in get()
139 return (E) mValues[i]; in get()
161 public E removeReturnOld(int key) { in removeReturnOld()
166 final E old = (E) mValues[i]; in removeReturnOld()
250 public void set(int key, E value) { in set()
[all …]
DArraySet.java56 public final class ArraySet<E> implements Collection<E>, Set<E> {
95 private MapCollections<E, E> mCollections;
317 public ArraySet(ArraySet<E> set) { in ArraySet()
327 public ArraySet(Collection<? extends E> set) { in ArraySet()
337 public ArraySet(@Nullable E[] array) { in ArraySet()
340 for (E value : array) { in ArraySet()
419 public E valueAt(int index) { in valueAt()
436 public E valueAtUnchecked(int index) { in valueAtUnchecked()
437 return (E) mArray[index]; in valueAtUnchecked()
456 public boolean add(E value) { in add()
[all …]
/frameworks/compile/slang/
Dslang_rs_check_ast.cpp33 for (clang::Stmt::child_iterator I = S->child_begin(), E = S->child_end(); in VisitStmt() local
34 I != E; in VisitStmt()
42 void RSCheckAST::WarnOnSetElementAt(clang::CallExpr *E) { in WarnOnSetElementAt() argument
44 Decl = clang::dyn_cast_or_null<clang::FunctionDecl>(E->getCalleeDecl()); in WarnOnSetElementAt()
52 Expr = E->getArg(1); in WarnOnSetElementAt()
128 Context->ReportWarning(E->getLocStart(), in WarnOnSetElementAt()
140 void RSCheckAST::VisitCallExpr(clang::CallExpr *E) { in VisitCallExpr() argument
141 WarnOnSetElementAt(E); in VisitCallExpr()
143 for (clang::CallExpr::arg_iterator AI = E->arg_begin(), AE = E->arg_end(); in VisitCallExpr()
234 E = DS->decl_end(); in VisitDeclStmt() local
[all …]
/frameworks/compile/slang/BitWriter_2_9_func/
DValueEnumerator.cpp38 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
39 I != E; ++I) in ValueEnumerator()
43 for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { in ValueEnumerator() local
49 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
50 I != E; ++I) in ValueEnumerator()
57 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
58 I != E; ++I) in ValueEnumerator()
63 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
64 I != E; ++I) in ValueEnumerator()
155 E = Map.end(); I != E; ++I) { in print() local
[all …]
/frameworks/compile/slang/BitWriter_3_2/
DValueEnumerator.cpp38 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
39 I != E; ++I) in ValueEnumerator()
43 for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { in ValueEnumerator() local
49 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
50 I != E; ++I) in ValueEnumerator()
57 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
58 I != E; ++I) in ValueEnumerator()
63 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
64 I != E; ++I) in ValueEnumerator()
155 E = Map.end(); I != E; ++I) { in print() local
[all …]
/frameworks/compile/slang/BitWriter_2_9/
DValueEnumerator.cpp38 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
39 I != E; ++I) in ValueEnumerator()
43 for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { in ValueEnumerator() local
49 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
50 I != E; ++I) in ValueEnumerator()
57 for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); in ValueEnumerator() local
58 I != E; ++I) in ValueEnumerator()
63 for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); in ValueEnumerator() local
64 I != E; ++I) in ValueEnumerator()
155 E = Map.end(); I != E; ++I) { in print() local
[all …]
/frameworks/base/core/java/com/android/internal/util/function/pooled/
DPooledLambda.java305 static <A, B, C, D, E> PooledPredicate<A> obtainPredicate( in obtainPredicate()
306 QuintPredicate<? super A, ? super B, ? super C, ? super D, ? super E> function, in obtainPredicate()
307 ArgumentPlaceholder<A> arg1, B arg2, C arg3, D arg4, E arg5) { in obtainPredicate()
488 static <A, B, C, D, E> PooledRunnable obtainRunnable( in obtainRunnable()
489 QuintConsumer<? super A, ? super B, ? super C, ? super D, ? super E> function, in obtainRunnable()
490 A arg1, B arg2, C arg3, D arg4, E arg5) { in obtainRunnable()
523 static <A, B, C, D, E> Message obtainMessage( in obtainMessage()
524 QuintConsumer<? super A, ? super B, ? super C, ? super D, ? super E> function, in obtainMessage()
525 A arg1, B arg2, C arg3, D arg4, E arg5) { in obtainMessage()
548 static <A, B, C, D, E, F> PooledRunnable obtainRunnable( in obtainRunnable()
[all …]
DOmniFunction.java53 abstract class OmniFunction<A, B, C, D, E, F, G, H, I, J, K, R> implements
55 QuadFunction<A, B, C, D, R>, QuintFunction<A, B, C, D, E, R>,
56 HexFunction<A, B, C, D, E, F, R>, HeptFunction<A, B, C, D, E, F, G, R>,
57 OctFunction<A, B, C, D, E, F, G, H, R>, NonaFunction<A, B, C, D, E, F, G, H, I, R>,
58 DecFunction<A, B, C, D, E, F, G, H, I, J, R>,
59 UndecFunction<A, B, C, D, E, F, G, H, I, J, K, R>,
61 QuintConsumer<A, B, C, D, E>, HexConsumer<A, B, C, D, E, F>,
62 HeptConsumer<A, B, C, D, E, F, G>, OctConsumer<A, B, C, D, E, F, G, H>,
63 NonaConsumer<A, B, C, D, E, F, G, H, I>, DecConsumer<A, B, C, D, E, F, G, H, I, J>,
64 UndecConsumer<A, B, C, D, E, F, G, H, I, J, K>,
[all …]

1234567891011