Searched refs:collection (Results 1 - 25 of 58) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DArrayUtilsTest.java40 ArrayList<Object> collection = null;
41 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull));
43 collection = new ArrayList<>();
44 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull));
46 collection = new ArrayList<>(Collections.singletonList(a));
47 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull));
48 assertEquals(1, collection.size());
49 assertTrue(collection.contains(a));
51 collection = new ArrayList<>(Collections.singletonList(null));
52 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNul
[all...]
/frameworks/base/libs/hwui/tests/unit/
H A DStringUtilsTests.cpp25 auto collection = StringUtils::split("a b c"); local
27 EXPECT_TRUE(collection.has("a"));
28 EXPECT_TRUE(collection.has("b"));
29 EXPECT_TRUE(collection.has("c"));
30 EXPECT_FALSE(collection.has("d"));
34 auto collection = StringUtils::split("GL_ext1 GL_ext2 GL_ext3"); local
36 EXPECT_TRUE(collection.has("GL_ext1"));
37 EXPECT_FALSE(collection.has("GL_ext")); // string present, but not in list
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/
H A DAbstractCollection.java60 public boolean containsAll(Collection<?> collection) { argument
65 public boolean addAll(Collection<? extends T> collection) { argument
70 public boolean removeAll(Collection<?> collection) { argument
75 public boolean retainAll(Collection<?> collection) { argument
H A DTrackedCollections.java40 public synchronized void track(Collection<?> collection, String tag) { argument
41 CollectionState collectionState = mCollections.get(collection);
46 mCollections.put(collection, collectionState);
52 collectionState.lastCount = collection.size();
59 /** The number of elements in the collection at startUptime + HALFWAY_DELAY */
61 /** The number of elements in the collection at lastUptime */
66 * Dump statistics about the tracked collection:
72 * - the current size of the collection
H A DTrackedObjects.java51 public static boolean isTrackedObject(Collection<?> collection) { argument
52 return collection instanceof TrackedClass;
/frameworks/base/media/mca/filterfw/native/base/
H A Dutilities.h63 FindOrNull(const Collection& collection, argument
65 typename Collection::const_iterator it = collection.find(key);
66 if (it == collection.end()) {
117 FindPtrOrNull(const Collection& collection, argument
119 typename Collection::const_iterator it = collection.find(key);
120 if (it == collection.end()) {
127 // Returns true if the key is in the collection.
129 bool ContainsKey(const Collection& collection, const Key& key) { argument
130 return collection.find(key) != collection
138 InsertIfNotPresent(Collection * const collection, const Key& key, const Value& value) argument
[all...]
/frameworks/base/media/mca/filterpacks/native/base/
H A Dutilities.h75 FindOrNull(const Collection& collection, argument
77 typename Collection::const_iterator it = collection.find(key);
78 if (it == collection.end()) {
129 FindPtrOrNull(const Collection& collection, argument
131 typename Collection::const_iterator it = collection.find(key);
132 if (it == collection.end()) {
139 // Returns true if the key is in the collection.
141 bool ContainsKey(const Collection& collection, const Key& key) { argument
142 return collection.find(key) != collection
150 InsertIfNotPresent(Collection * const collection, const Key& key, const Value& value) argument
[all...]
/frameworks/minikin/tests/unittest/
H A DFontCollectionItemizeTest.cpp56 void itemize(const std::shared_ptr<FontCollection>& collection, const char* str, FontStyle style, argument
65 collection->itemize(buf, len, style, result);
81 std::shared_ptr<FontCollection> collection(getFontCollection(kTestFontDir, kItemizeFontXml));
89 itemize(collection, "'a' 'b' 'c' 'd' 'e'", kRegularStyle, &runs);
97 itemize(collection, "'a' 'b' 'c' 'd' 'e'", kItalicStyle, &runs);
105 itemize(collection, "'a' 'b' 'c' 'd' 'e'", kBoldStyle, &runs);
113 itemize(collection, "'a' 'b' 'c' 'd' 'e'", kBoldItalicStyle, &runs);
123 itemize(collection, "'a' ',' '-' 'd' '!'", kRegularStyle, &runs);
131 itemize(collection, "'a' ',' '-' 'd' '!'", kRegularStyle, &runs);
141 itemize(collection, "'
[all...]
H A DFontCollectionTest.cpp82 std::shared_ptr<FontCollection> collection(getFontCollection(kTestFontDir, kEmojiXmlFile));
85 EXPECT_TRUE(collection->hasVariationSelector(0x2623, 0xFE0E));
86 EXPECT_TRUE(collection->hasVariationSelector(0x2623, 0xFE0F));
90 EXPECT_TRUE(collection->hasVariationSelector(0x2626, 0xFE0E));
91 EXPECT_FALSE(collection->hasVariationSelector(0x2626, 0xFE0F));
95 EXPECT_TRUE(collection->hasVariationSelector(0x262A, 0xFE0E));
96 EXPECT_TRUE(collection->hasVariationSelector(0x262A, 0xFE0F));
99 EXPECT_TRUE(collection->hasVariationSelector(0x262E, 0xFE0E));
100 EXPECT_FALSE(collection->hasVariationSelector(0x262E, 0xFE0F));
103 EXPECT_FALSE(collection
[all...]
/frameworks/support/compat/java/android/support/v4/util/
H A DArrayMap.java124 * Determine if the array map contains all of the keys in the given collection.
125 * @param collection The collection whose contents are to be checked against.
127 * in <var>collection</var>, else returns false.
129 public boolean containsAll(Collection<?> collection) { argument
130 return MapCollections.containsAllHelper(this, collection);
146 * Remove all keys in the array map that exist in the given collection.
147 * @param collection The collection whose contents are to be used to remove keys.
150 public boolean removeAll(Collection<?> collection) { argument
160 retainAll(Collection<?> collection) argument
[all...]
H A DMapCollections.java27 * Helper for writing standard Java collection interfaces to a data
172 public boolean addAll(Collection<? extends Map.Entry<K, V>> collection) { argument
174 for (Map.Entry<K, V> entry : collection) {
199 public boolean containsAll(Collection<?> collection) { argument
200 Iterator<?> it = collection.iterator();
225 public boolean removeAll(Collection<?> collection) { argument
230 public boolean retainAll(Collection<?> collection) { argument
275 public boolean addAll(Collection<? extends K> collection) { argument
290 public boolean containsAll(Collection<?> collection) { argument
291 return containsAllHelper(colGetMap(), collection);
315 removeAll(Collection<?> collection) argument
320 retainAll(Collection<?> collection) argument
363 addAll(Collection<? extends V> collection) argument
378 containsAll(Collection<?> collection) argument
409 removeAll(Collection<?> collection) argument
425 retainAll(Collection<?> collection) argument
456 containsAllHelper(Map<K, V> map, Collection<?> collection) argument
466 removeAllHelper(Map<K, V> map, Collection<?> collection) argument
475 retainAllHelper(Map<K, V> map, Collection<?> collection) argument
[all...]
/frameworks/base/tools/aapt2/io/
H A DZipArchive.cpp67 ZipFileCollection* collection)
68 : current_(collection->files_.begin()), end_(collection->files_.end()) {}
84 std::unique_ptr<ZipFileCollection> collection = local
87 int32_t result = OpenArchive(path.data(), &collection->handle_);
93 return collection;
101 result = StartIteration(collection->handle_, &cookie, nullptr, nullptr);
118 util::make_unique<ZipFile>(collection->handle_, zip_data, Source(nested_path));
119 collection->files_by_name_[zip_entry_path] = file.get();
120 collection
66 ZipFileCollectionIterator( ZipFileCollection* collection) argument
[all...]
H A DFileSystem.cpp47 FileCollectionIterator::FileCollectionIterator(FileCollection* collection) argument
48 : current_(collection->files_.begin()), end_(collection->files_.end()) {}
/frameworks/base/tools/aapt2/link/
H A DTableMerger.h83 io::IFileCollection* collection = nullptr);
91 io::IFileCollection* collection = nullptr);
100 io::IFileCollection* collection);
130 io::IFileCollection* collection, bool overlay, bool allow_new);
/frameworks/data-binding/extensions/library/src/main/java/android/databinding/
H A DObservableArrayList.java56 public boolean addAll(Collection<? extends T> collection) { argument
58 boolean added = super.addAll(collection);
66 public boolean addAll(int index, Collection<? extends T> collection) { argument
67 boolean added = super.addAll(index, collection);
69 notifyAdd(index, collection.size());
H A DObservableArrayMap.java59 public boolean removeAll(Collection<?> collection) { argument
61 for (Object key : collection) {
72 public boolean retainAll(Collection<?> collection) { argument
76 if (!collection.contains(key)) {
/frameworks/base/core/java/android/util/
H A DMapCollections.java29 * Helper for writing standard Java collection interfaces to a data
175 public boolean addAll(Collection<? extends Map.Entry<K, V>> collection) { argument
177 for (Map.Entry<K, V> entry : collection) {
202 public boolean containsAll(Collection<?> collection) { argument
203 Iterator<?> it = collection.iterator();
228 public boolean removeAll(Collection<?> collection) { argument
233 public boolean retainAll(Collection<?> collection) { argument
278 public boolean addAll(Collection<? extends K> collection) { argument
293 public boolean containsAll(Collection<?> collection) { argument
294 return containsAllHelper(colGetMap(), collection);
318 removeAll(Collection<?> collection) argument
323 retainAll(Collection<?> collection) argument
366 addAll(Collection<? extends V> collection) argument
381 containsAll(Collection<?> collection) argument
412 removeAll(Collection<?> collection) argument
428 retainAll(Collection<?> collection) argument
459 containsAllHelper(Map<K, V> map, Collection<?> collection) argument
469 removeAllHelper(Map<K, V> map, Collection<?> collection) argument
478 retainAllHelper(Map<K, V> map, Collection<?> collection) argument
[all...]
/frameworks/base/tests/net/java/com/android/server/net/
H A DNetworkStatsCollectionTest.java105 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
106 collection.readLegacyNetwork(testFile);
109 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
114 collection.write(new DataOutputStream(bos));
117 collection.reset();
118 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
122 collection.read(new ByteArrayInputStream(bos.toByteArray()));
123 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
131 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
132 collection
522 getHistory(NetworkStatsCollection collection, SubscriptionPlan augmentPlan, long start, long end) argument
528 assertSummaryTotal(NetworkStatsCollection collection, NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets, @NetworkStatsAccess.Level int accessLevel) argument
537 assertSummaryTotalIncludingTags(NetworkStatsCollection collection, NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets) argument
[all...]
/frameworks/minikin/tests/perftests/
H A DFontCollection.cpp41 std::shared_ptr<FontCollection> collection(
52 collection->hasVariationSelector(baseCp, vsCp);
77 std::shared_ptr<FontCollection> collection(
93 collection->itemize(buffer, utf16_length, style, &result);
/frameworks/minikin/include/minikin/
H A DLayout.h76 const std::shared_ptr<FontCollection>& collection);
80 const std::shared_ptr<FontCollection>& collection, float* advances);
119 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances);
124 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances);
128 bool isRtl, LayoutContext* ctx, const std::shared_ptr<FontCollection>& collection);
/frameworks/base/core/java/android/view/textclassifier/
H A DSmartSelection.java112 ClassificationResult(String collection, float score) { argument
113 mCollection = collection;
/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkStatsRecorder.java358 public CombiningRewriter(NetworkStatsCollection collection) { argument
359 mCollection = checkNotNull(collection, "missing NetworkStatsCollection");
426 final NetworkStatsCollection collection = new NetworkStatsCollection(mBucketDuration);
427 collection.readLegacyNetwork(file);
429 final long startMillis = collection.getStartMillis();
430 final long endMillis = collection.getEndMillis();
432 if (!collection.isEmpty()) {
435 mRotator.rewriteActive(new CombiningRewriter(collection), startMillis);
446 final NetworkStatsCollection collection = new NetworkStatsCollection(mBucketDuration);
447 collection
[all...]
/frameworks/base/core/java/android/text/method/
H A DNumberKeyListener.java153 static boolean addDigits(@NonNull Collection<Character> collection, @Nullable Locale locale) { argument
162 collection.add(Character.valueOf(digits[i].charAt(0)));
174 @NonNull Collection<Character> collection, @Nullable Locale locale,
205 collection.add(Character.valueOf(ch));
212 @NonNull Collection<Character> collection, @Nullable Locale locale,
216 collection, locale, skeletons[i], symbolsToIgnore);
226 static boolean addAmPmChars(@NonNull Collection<Character> collection, argument
236 collection.add(Character.valueOf(ch));
173 addFormatCharsFromSkeleton( @onNull Collection<Character> collection, @Nullable Locale locale, @NonNull String skeleton, @NonNull String symbolsToIgnore) argument
211 addFormatCharsFromSkeletons( @onNull Collection<Character> collection, @Nullable Locale locale, @NonNull String[] skeletons, @NonNull String symbolsToIgnore) argument
/frameworks/av/services/audiopolicy/engineconfigurable/src/
H A DEngine.cpp119 const Collection<Key> collection = getCollection<Key>(); local
120 return collection.get(key);
126 Collection<Key> &collection = getCollection<Key>(); local
127 return collection.add(name, key);
135 ALOGE("%s: Element not found within collection", __FUNCTION__);
195 ALOGE("%s: Element not found within collection", __FUNCTION__);
/frameworks/data-binding/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/
H A DGenericAdapter.java68 private static <T> void setText(TextView view, Collection<T> collection) { argument
71 for (T val : collection) {

Completed in 775 milliseconds

123