Home
last modified time | relevance | path

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

12345678

/aosp14/frameworks/base/core/java/com/google/android/collect/
H A 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()
H A 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()
/aosp14/frameworks/base/services/core/java/com/android/server/utils/
H A DWatchedLongSparseArray.java34 private final LongSparseArray<E> mStorage;
191 public E get(long key) { in get()
199 public E get(long key, E valueIfKeyNotFound) { in get()
207 E old = mStorage.get(key, null); in delete()
228 E old = mStorage.valueAt(index); in removeAt()
239 public void put(long key, E value) { in put()
240 E old = mStorage.get(key); in put()
286 public E valueAt(int index) { in valueAt()
299 E old = mStorage.valueAt(index); in setValueAt()
323 public int indexOfValue(E value) { in indexOfValue()
[all …]
H A DWatchedSparseArray.java36 private final SparseArray<E> mStorage;
204 public E get(int key) { in get()
212 public E get(int key, E valueIfKeyNotFound) { in get()
220 final E child = mStorage.get(key); in delete()
230 public E removeReturnOld(int key) { in removeReturnOld()
291 public void put(int key, E value) { in put()
292 final E old = mStorage.get(key); in put()
342 public E valueAt(int index) { in valueAt()
385 public int indexOfValue(E value) { in indexOfValue()
424 public void append(int key, E value) { in append()
[all …]
H A DWatchedArrayList.java35 private final ArrayList<E> mStorage;
147 mStorage = new ArrayList<E>(); in WatchedArrayList()
204 public boolean add(E value) { in add()
214 public void add(int index, E value) { in add()
225 for (E e: c) { in addAll()
240 for (E e: c) { in addAll()
292 public E get(int index) { in get()
320 public E remove(int index) { in remove()
343 public E set(int index, E value) { in set()
387 public WatchedArrayList<E> snapshot() { in snapshot()
[all …]
H A DWatchedArraySet.java31 public class WatchedArraySet<E> extends WatchableImpl
35 private final ArraySet<E> mStorage;
151 public WatchedArraySet(@Nullable E[] array) { in WatchedArraySet()
197 public ArraySet<E> untrackedStorage() { in untrackedStorage()
247 public E valueAt(int index) { in valueAt()
265 public boolean add(E value) { in add()
277 public void append(E value) { in append()
327 public E removeAt(int index) { in removeAt()
398 public WatchedArraySet<E> snapshot() { in snapshot()
421 public static <E> void snapshot(@NonNull WatchedArraySet<E> dst, in snapshot()
[all …]
H A 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()
/aosp14/frameworks/base/core/java/com/android/internal/app/
H A 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 …]
/aosp14/frameworks/base/services/core/java/com/android/server/am/
H A DUidProcessMap.java27 public class UidProcessMap<E> {
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()
64 final E old = names.remove(name); in remove()
76 public SparseArray<ArrayMap<String, E>> getMap() { in getMap()
97 public void putAll(UidProcessMap<E> other) { in putAll()
[all …]
H A DBaseAppStateEvents.java36 abstract class BaseAppStateEvents<E> {
52 final LinkedList<E>[] mEvents;
76 mEvents[i] = new LinkedList<E>(other.mEvents[i]); in BaseAppStateEvents()
84 void addEvent(E event, long now, int index) { in addEvent()
86 mEvents[index] = new LinkedList<E>(); in addEvent()
88 final LinkedList<E> events = mEvents[index]; in addEvent()
142 LinkedList<E> getRawEvents(int index) { in getRawEvents()
149 abstract LinkedList<E> add(LinkedList<E> events, LinkedList<E> otherEvents); in add()
H A DFgsTempAllowList.java41 public class FgsTempAllowList<E> {
48 private final SparseArray<Pair<Long, E>> mTempAllowList = new SparseArray<>();
76 public void add(int uid, long durationMs, @Nullable E entry) { in add()
96 final Pair<Long, E> existing = mTempAllowList.get(uid); in add()
110 public Pair<Long, E> get(int uid) { in get()
129 Pair<Long, E> entry = get(uid); in isAllowed()
160 public void forEach(BiConsumer<Integer, Pair<Long, E>> callback) { in forEach()
164 final Pair<Long, E> entry = mTempAllowList.valueAt(i); in forEach()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DNamedListenerSet.kt33 class NamedListenerSet<E : Any>(
34 private val getName: (E) -> String = { it.javaClass.name },
35 ) : IListenerSet<E> {
43 override fun iterator(): Iterator<E> = iterator {
47 override fun containsAll(elements: Collection<E>) =
50 override fun contains(element: E) = listeners.firstOrNull { it.listener == element } != null
54 override fun remove(element: E): Boolean = listeners.removeIf { it.listener == element }
57 inner class NamedListener(val listener: E) {
75 inline fun forEachNamed(block: (String, E) -> Unit) =
82 inline fun forEachTraced(block: (E) -> Unit) = forEachNamed { name, listener ->
[all …]
H A 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)
/aosp14/frameworks/base/core/java/android/view/accessibility/
H A 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()
/aosp14/frameworks/base/services/core/java/com/android/server/textclassifier/
H A 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()
/aosp14/frameworks/base/services/core/java/com/android/server/hdmi/
H A 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()
/aosp14/frameworks/base/core/java/android/util/
H A DSparseArray.java97 public SparseArray<E> clone() { in clone()
98 SparseArray<E> clone = null; 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()
343 public E valueAt(int index) { in valueAt()
353 return (E) mValues[index]; in valueAt()
402 public int indexOfValue(E value) { in indexOfValue()
[all …]
H A DArraySet.java56 public final class ArraySet<E> implements Collection<E>, Set<E> {
95 private MapCollections<E, E> mCollections;
419 public E valueAt(int index) { in valueAt()
437 return (E) mArray[index]; in valueAtUnchecked()
456 public boolean add(E value) { in add()
665 return (E) old; in removeAt()
875 private MapCollections<E, E> getCollection() { in getCollection()
877 mCollections = new MapCollections<E, E>() { in getCollection()
899 protected Map<E, E> colGetMap() { in getCollection()
904 protected void colPut(E key, E value) { in getCollection()
[all …]
H A DLongSparseArray.java95 public LongSparseArray<E> clone() { in clone()
96 LongSparseArray<E> clone = null; in clone()
111 public E get(long key) { in get()
120 public E get(long key, E valueIfKeyNotFound) { in get()
126 return (E) mValues[i]; in get()
216 public void put(long key, E value) { in put()
300 public E valueAt(int index) { in valueAt()
310 return (E) mValues[index]; in valueAt()
357 public int indexOfValue(E value) { in indexOfValue()
380 public int indexOfValueByValue(E value) { in indexOfValueByValue()
[all …]
/aosp14/frameworks/base/libs/hwui/utils/
H A 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;
/aosp14/frameworks/base/core/java/com/android/internal/util/function/pooled/
H A DPooledLambda.java305 static <A, B, C, D, E> PooledPredicate<A> obtainPredicate( in obtainPredicate()
488 static <A, B, C, D, E> PooledRunnable obtainRunnable( 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()
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()
584 static <A, B, C, D, E, F> Message obtainMessage( in obtainMessage()
647 static <A, B, C, D, E, F, G> Message obtainMessage( in obtainMessage()
713 static <A, B, C, D, E, F, G, H> Message obtainMessage( in obtainMessage()
745 E arg5, F arg6, G arg7, H arg8, I arg9) { in obtainRunnable()
[all …]
H A DOmniFunction.java56 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>,
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>,
96 public boolean test(A o, B o2, C o3, D o4, E o5) { in test()
141 public R apply(A a, B b, C c, D d, E e) { in apply()
146 public R apply(A a, B b, C c, D d, E e, F f) { in apply()
[all …]
/aosp14/frameworks/base/core/java/android/os/
H A DRemoteCallbackList.java55 public class RemoteCallbackList<E extends IInterface> {
67 final E mCallback;
70 Callback(E callback, Object cookie) { in Callback()
87 public boolean register(E callback) { in register()
117 public boolean register(E callback, Object cookie) { in register()
154 public boolean unregister(E callback) { in unregister()
188 public void onCallbackDied(E callback) { in onCallbackDied()
283 public E getBroadcastItem(int index) { in getBroadcastItem()
329 public void broadcast(Consumer<E> action) { in broadcast()
363 public <C> void broadcast(BiConsumer<E, C> action) { in broadcast() argument
[all …]
/aosp14/frameworks/base/services/core/java/com/android/server/wm/
H A DWindowList.java25 class WindowList<E> extends ArrayList<E> {
27 void addFirst(E e) { in addFirst()
31 E peekLast() { in peekLast()
35 E peekFirst() { in peekFirst()
/aosp14/frameworks/base/core/java/android/text/
H A DSpanSet.java34 public class SpanSet<E> {
35 private final Class<? extends E> classType;
39 E[] spans;
44 SpanSet(Class<? extends E> type) { in SpanSet()
51 final E[] allSpans = spanned.getSpans(start, limit, classType); in init()
56 spans = (E[]) Array.newInstance(classType, length); in init()
65 final E span = allSpans[i]; in init()

12345678