Home
last modified time | relevance | path

Searched refs:entrySet (Results 1 – 25 of 222) sorted by relevance

123456789

/external/guava/guava-tests/test/com/google/common/collect/
DWellBehavedMapTest.java39 assertTrue(map.entrySet().contains(Maps.immutableEntry(Foo.X, 1))); in testEntrySet_contain()
40 assertTrue(map.entrySet().contains(Maps.immutableEntry(Foo.Y, new Integer(2)))); in testEntrySet_contain()
43 assertFalse(map.entrySet().contains(Maps.immutableEntry(Foo.X, 5))); in testEntrySet_contain()
46 assertFalse(map.entrySet().contains(Maps.immutableEntry(Foo.T, 0))); in testEntrySet_contain()
54 for (Map.Entry<Foo, Integer> entry : map.entrySet()) { in testEntry_setValue()
66 Map.Entry<Foo, Integer> entry1 = Iterables.getOnlyElement(map.entrySet()); in testEntriesAreMutableAndConsistent()
67 Map.Entry<Foo, Integer> entry2 = Iterables.getOnlyElement(map.entrySet()); in testEntriesAreMutableAndConsistent()
72 Set<Map.Entry<Foo, Integer>> entrySet = map.entrySet(); in testEntriesAreMutableAndConsistent() local
74 assertTrue(entrySet.contains(entry1)); in testEntriesAreMutableAndConsistent()
75 assertTrue(entrySet.contains(entry2)); in testEntriesAreMutableAndConsistent()
[all …]
DAbstractBiMapTest.java45 protected Set<Entry<Integer, String>> entrySet; field in AbstractBiMapTest
51 entrySet = bimap.entrySet(); in setUp()
255 entrySet.add(Maps.immutableEntry(1, "one")); in testEntrySetAdd()
263 entrySet.addAll(Collections.singleton(Maps.immutableEntry(1, "one"))); in testEntrySetAddAll()
270 entrySet.clear(); in testEntrySetClear()
271 assertTrue(entrySet.isEmpty()); in testEntrySetClear()
274 entrySet.clear(); in testEntrySetClear()
275 assertTrue(entrySet.isEmpty()); in testEntrySetClear()
280 assertFalse(entrySet.contains(Maps.immutableEntry(1, "one"))); in testEntrySetContains()
282 assertTrue(entrySet.contains(Maps.immutableEntry(1, "one"))); in testEntrySetContains()
[all …]
DForwardingMapTest.java95 @Override public Set<Entry<K, V>> entrySet() { in entrySet() method in ForwardingMapTest.StandardImplForwardingMap
100 .entrySet() in entrySet()
228 forward().entrySet();
251 final Set<Map.Entry<String, Boolean>> entrySet = createMock(Set.class);
257 expect(entrySet.iterator())
263 replay(map, entrySet);
270 @Override public Set<Entry<String, Boolean>> entrySet() {
274 return entrySet.iterator();
279 callAllPublicMethods(Set.class, forward.entrySet());
281 verify(map, entrySet);
[all …]
DTreeBasedTableTest.java387 Set<Map.Entry<Integer, Character>> entrySet = row.entrySet(); in testRowEntrySetContains() local
388 assertTrue(entrySet.contains(Maps.immutableEntry(10, 'X'))); in testRowEntrySetContains()
389 assertTrue(entrySet.contains(Maps.immutableEntry(20, 'X'))); in testRowEntrySetContains()
390 assertFalse(entrySet.contains(Maps.immutableEntry(15, 'X'))); in testRowEntrySetContains()
391 entrySet = row.tailMap(15).entrySet(); in testRowEntrySetContains()
392 assertFalse(entrySet.contains(Maps.immutableEntry(10, 'X'))); in testRowEntrySetContains()
393 assertTrue(entrySet.contains(Maps.immutableEntry(20, 'X'))); in testRowEntrySetContains()
394 assertFalse(entrySet.contains(Maps.immutableEntry(15, 'X'))); in testRowEntrySetContains()
404 Set<Map.Entry<Integer, Character>> entrySet = row.tailMap(15).entrySet(); in testRowEntrySetRemove() local
405 assertFalse(entrySet.remove(Maps.immutableEntry(10, 'X'))); in testRowEntrySetRemove()
[all …]
DImmutableSortedMapTest.java170 for (Entry<K, V> entry : map.entrySet()) { in assertMoreInvariants()
175 assertEquals("{" + joiner.join(map.entrySet()) + "}", in assertMoreInvariants()
177 assertEquals("[" + joiner.join(map.entrySet()) + "]", in assertMoreInvariants()
178 map.entrySet().toString()); in assertMoreInvariants()
184 assertEquals(Sets.newHashSet(map.entrySet()), map.entrySet()); in assertMoreInvariants()
717 for (Entry<K, V> entry : map.entrySet()) { in assertMapEquals()
747 assertTrue(map.entrySet().contains( in testMutableValues()
751 assertEquals(intMap.hashCode(), map.entrySet().hashCode()); in testMutableValues()
759 SerializableTester.reserializeAndAssert(map.entrySet()); in testViewSerialization()
769 ASSERT.that(map.entrySet()).hasContentsInOrder(Maps.immutableEntry("one", 1), in testHeadMapInclusive()
[all …]
/external/guava/guava-testlib/src/com/google/common/collect/testing/
DMapInterfaceTest.java181 Set<Entry<K, V>> entrySet = map.entrySet(); in assertInvariants() local
196 assertTrue(entrySet.contains(mapEntry(key, value))); in assertInvariants()
210 assertEquals(map.size(), entrySet.size()); in assertInvariants()
211 assertEquals(entrySet.size() == 0, entrySet.isEmpty()); in assertInvariants()
212 assertEquals(!entrySet.isEmpty(), entrySet.iterator().hasNext()); in assertInvariants()
213 assertFalse(entrySet.contains("foo")); in assertInvariants()
218 for (Entry<K, V> entry : entrySet) { in assertInvariants()
227 assertEquals(expectedEntrySetHash, entrySet.hashCode()); in assertInvariants()
228 assertTrue(entrySet.containsAll(new HashSet<Entry<K, V>>(entrySet))); in assertInvariants()
229 assertTrue(entrySet.equals(new HashSet<Entry<K, V>>(entrySet))); in assertInvariants()
[all …]
DSortedMapInterfaceTest.java102 final Set<Entry<K, V>> entrySet;
110 entrySet = map.entrySet();
119 assertFalse(entrySet.contains(entry));
197 List<Entry<K, V>> list = toList(map.entrySet());
201 assertEquals(expected, toList(headMap.entrySet()));
212 List<Entry<K, V>> list = toList(map.entrySet());
216 assertEquals(expected, toList(tailMap.entrySet()));
227 List<Entry<K, V>> list = toList(map.entrySet());
233 assertEquals(expected, toList(subMap.entrySet()));
267 Iterator<Entry<K, V>> iterator = map.entrySet().iterator();
[all …]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/
DTreeMapExtendTest.java152 assertEquals(tm.entrySet(), treeMap.entrySet()); in test_TreeMap_Constructor_Map()
161 assertEquals(subMap_default.entrySet(), treeMap.entrySet()); in test_TreeMap_Constructor_SortedMap()
327 Set entrySet = subMap_default.entrySet(); in test_SubMap_entrySet() local
328 assertFalse(entrySet.isEmpty()); in test_SubMap_entrySet()
329 assertEquals(9, entrySet.size()); in test_SubMap_entrySet()
331 entrySet = subMap_startExcluded_endExcluded.entrySet(); in test_SubMap_entrySet()
332 assertFalse(entrySet.isEmpty()); in test_SubMap_entrySet()
333 assertEquals(8, entrySet.size()); in test_SubMap_entrySet()
335 entrySet = subMap_startExcluded_endIncluded.entrySet(); in test_SubMap_entrySet()
336 assertFalse(entrySet.isEmpty()); in test_SubMap_entrySet()
[all …]
DWeakHashMapTest.java34 public Set entrySet() { in entrySet() method in WeakHashMapTest.MockMap
176 Set<Map.Entry<Object, Object>> entrySet = weakMap.entrySet(); in test_entrySet() local
178 entrySet.size()); in test_entrySet()
179 Iterator<Map.Entry<Object, Object>> it = entrySet.iterator(); in test_entrySet()
186 assertTrue("Assert 3: Entry not in entry set", entrySet in test_entrySet()
199 entrySet.size()); in test_entrySet()
200 assertSame("Assert 5: Entries not identical", entrySet.iterator() in test_entrySet()
201 .next(), entrySet.iterator().next()); in test_entrySet()
205 int size = entrySet.size(); in test_entrySet()
206 it = entrySet.iterator(); in test_entrySet()
[all …]
DSortedMapTestBase.java77 Set<Map.Entry<Integer,Integer>> refSet = ref.entrySet(); in testEntrySet()
78 Set<Map.Entry<Integer,Integer>> mapSet = map.entrySet(); in testEntrySet()
85 assertEquals(ref.entrySet(), map.entrySet()); in testEntrySet()
230 Map.Entry<Integer, Integer> refE = ref.entrySet().iterator().next(); in testSubMap()
231 Map.Entry<Integer, Integer> mapE = map.entrySet().iterator().next(); in testSubMap()
268 assertTrue("Should not have entries", !map.entrySet().iterator() in testIsEmpty2()
275 assertTrue("Should not have entries", !map.entrySet().iterator() in testIsEmpty2()
282 assertFalse(map.entrySet().iterator().hasNext()); in testIsEmpty2()
332 assertEquals(ref.entrySet(), map.entrySet()); in testViews()
333 compareIterators(ref.entrySet(), map.entrySet()); in testViews()
/external/guava/guava-tests/test/com/google/common/cache/
DEmptyCachesTest.java270 Set<Entry<Object, Object>> entries = cache.asMap().entrySet(); in testEntrySet_nullToArray()
284 cache.asMap().entrySet().add(entryOf(1, 1)); in testEntrySet_addNotSupported()
303 Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); in testEntrySet_clear() local
304 entrySet.clear(); in testEntrySet_clear()
305 checkEmpty(entrySet); in testEntrySet_clear()
312 Set<Entry<Object, Object>> entrySet = cache.asMap().entrySet(); in testEntrySet_empty_remove() local
313 assertFalse(entrySet.remove(null)); in testEntrySet_empty_remove()
314 assertFalse(entrySet.remove(entryOf(6, 6))); in testEntrySet_empty_remove()
315 assertFalse(entrySet.remove(entryOf(-6, -6))); in testEntrySet_empty_remove()
316 assertFalse(entrySet.removeAll(asList(null, entryOf(0, 0), entryOf(15, 15)))); in testEntrySet_empty_remove()
[all …]
/external/guava/guava/src/com/google/common/collect/
DAbstractMultiset.java56 return entrySet().isEmpty(); in isEmpty()
69 for (Entry<E> entry : entrySet()) { in count()
164 private transient Set<Entry<E>> entrySet; field in AbstractMultiset
166 @Override public Set<Entry<E>> entrySet() { in entrySet() method in AbstractMultiset
167 Set<Entry<E>> result = entrySet; in entrySet()
168 return (result == null) ? entrySet = createEntrySet() : result; in entrySet()
209 return entrySet().hashCode(); in hashCode()
219 return entrySet().toString(); in toString()
DMultisets.java118 transient Set<Multiset.Entry<E>> entrySet; field in Multisets.UnmodifiableMultiset
121 @Override public Set<Multiset.Entry<E>> entrySet() { in entrySet() method in Multisets.UnmodifiableMultiset
122 Set<Multiset.Entry<E>> es = entrySet; in entrySet()
126 ? entrySet = (Set) Collections.unmodifiableSet(delegate.entrySet()) in entrySet()
379 transient Set<Entry<E>> entrySet; field in Multisets.SetMultiset
381 @Override public Set<Entry<E>> entrySet() { in entrySet() method in Multisets.SetMultiset
382 Set<Entry<E>> es = entrySet; in entrySet()
384 es = entrySet = new EntrySet<E>() { in entrySet()
513 final Iterator<Entry<E>> iterator1 = multiset1.entrySet().iterator(); in intersection()
548 for (Entry<?> entry : subMultiset.entrySet()) {
[all …]
DForwardingMultiset.java81 public Set<Entry<E>> entrySet() { in entrySet() method in ForwardingMultiset
82 return delegate().entrySet(); in entrySet()
122 Iterator<Entry<E>> entryIterator = entrySet().iterator(); in standardClear()
137 for (Entry<?> entry : this.entrySet()) { in standardCount()
299 return entrySet().hashCode(); in standardHashCode()
310 return entrySet().toString(); in standardToString()
DImmutableMultiset.java204 return copyFromEntries(multiset.entrySet()); in copyOfInternal()
330 for (Entry<?> entry : that.entrySet()) { in equals()
341 return Sets.hashCodeImpl(entrySet()); in hashCode()
345 return entrySet().toString(); in toString()
348 private transient ImmutableSet<Entry<E>> entrySet;
351 public Set<Entry<E>> entrySet() { in entrySet() method
352 ImmutableSet<Entry<E>> es = entrySet; in entrySet()
353 return (es == null) ? (entrySet = createEntrySet()) : es; in entrySet()
450 return multiset.entrySet(); in readResolve()
462 int distinct = multiset.entrySet().size(); in SerializedForm()
[all …]
DMaps.java361 for (Entry<? extends K, ? extends V> entry : left.entrySet()) { in difference()
550 for (Entry<? extends K, ? extends V> entry : left.entrySet()) { in difference()
734 Set<Entry<K, V>> entrySet) { in unmodifiableEntrySet() argument
736 Collections.unmodifiableSet(entrySet)); in unmodifiableEntrySet()
1202 Set<Entry<K, V2>> entrySet;
1204 @Override public Set<Entry<K, V2>> entrySet() {
1205 Set<Entry<K, V2>> result = entrySet;
1207 entrySet = result = new EntrySet<K, V2>() {
1214 fromMap.entrySet().iterator();
1583 for (Entry<? extends K, ? extends V> entry : map.entrySet()) {
[all …]
DForwardingMap.java124 public Set<Entry<K, V>> entrySet() { in entrySet() method in ForwardingMap
125 return delegate().entrySet(); in entrySet()
161 Iterator<Entry<K, V>> entryIterator = entrySet().iterator(); in standardRemove()
181 Iterator<Entry<K, V>> entryIterator = entrySet().iterator(); in standardClear()
281 return !entrySet().iterator().hasNext(); in standardIsEmpty()
303 return Sets.hashCodeImpl(entrySet()); in standardHashCode()
DArrayTable.java540 ColumnEntrySet entrySet;
542 @Override public Set<Entry<R, V>> entrySet() {
543 ColumnEntrySet set = entrySet;
544 return (set == null) ? entrySet = new ColumnEntrySet(columnIndex) : set;
618 transient ColumnMapEntrySet entrySet;
620 @Override public Set<Entry<C, Map<R, V>>> entrySet() {
621 ColumnMapEntrySet set = entrySet;
622 return (set == null) ? entrySet = new ColumnMapEntrySet() : set;
685 RowEntrySet entrySet;
687 @Override public Set<Entry<C, V>> entrySet() {
[all …]
DWellBehavedMap.java36 private Set<Entry<K, V>> entrySet; field in WellBehavedMap
56 @Override public Set<Entry<K, V>> entrySet() { in entrySet() method in WellBehavedMap
57 Set<Entry<K, V>> es = entrySet; in entrySet()
61 return entrySet = Sets.transform( in entrySet()
DSortedMultisets.java157 private transient Set<Entry<E>> entrySet;
159 @Override public Set<Entry<E>> entrySet() { in entrySet() method
160 Set<Entry<E>> result = entrySet; in entrySet()
161 return (result == null) ? entrySet = createEntrySet() : result; in entrySet()
175 return forwardMultiset().entrySet().size(); in createEntrySet()
193 return entrySet().toString();
DSingletonImmutableMap.java82 private transient ImmutableSet<Entry<K, V>> entrySet; field in SingletonImmutableMap
84 @Override public ImmutableSet<Entry<K, V>> entrySet() { in entrySet() method in SingletonImmutableMap
85 ImmutableSet<Entry<K, V>> es = entrySet; in entrySet()
86 return (es == null) ? (entrySet = ImmutableSet.of(entry())) : es; in entrySet()
142 Entry<?, ?> entry = that.entrySet().iterator().next(); in equals()
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DMultisetWritesTester.java121 getMultiset().entrySet().clear(); in testEntrySet_clear()
129 Iterator<Multiset.Entry<E>> iterator = getMultiset().entrySet().iterator(); in testEntrySet_iterator()
148 Iterator<Multiset.Entry<E>> iterator = getMultiset().entrySet().iterator(); in testEntrySet_iterator_remove_unsupported()
163 getMultiset().entrySet().remove( in testEntrySet_remove_present()
175 getMultiset().entrySet().remove( in testEntrySet_remove_missing()
187 getMultiset().entrySet().removeAll( in testEntrySet_removeAll_present()
199 getMultiset().entrySet().removeAll( in testEntrySet_removeAll_missing()
209 getMultiset().entrySet().removeAll(null); in testEntrySet_removeAll_null()
219 getMultiset().entrySet().retainAll( in testEntrySet_retainAll_present()
231 getMultiset().entrySet().retainAll( in testEntrySet_retainAll_missing()
[all …]
DMultisetNavigationTester.java175 assertEquals(Arrays.asList(b, c), copyToList(sortedMultiset.entrySet())); in testPollFirst()
229 assertEquals(Arrays.asList(a, b), copyToList(sortedMultiset.entrySet())); in testPollLast()
244 Iterators.addAll(ascending, sortedMultiset.entrySet().iterator()); in testDescendingNavigation()
246 Iterators.addAll(descending, sortedMultiset.descendingMultiset().entrySet().iterator()); in testDescendingNavigation()
442 assertTrue(multiset.entrySet().isEmpty()); in testEmptyRangeSubMultiset()
444 assertEquals(0, multiset.entrySet().size()); in testEmptyRangeSubMultiset()
445 assertEquals(0, multiset.entrySet().toArray().length); in testEmptyRangeSubMultiset()
446 assertFalse(multiset.entrySet().iterator().hasNext()); in testEmptyRangeSubMultiset()
520 List<Entry<E>> entries = copyToList(sortedMultiset.entrySet()); in testSubMultisetEntrySet()
524 assertEquals(expected, copyToList(subMultiset.entrySet())); in testSubMultisetEntrySet()
[all …]
DMultisetReadsTester.java80 getMultiset().entrySet().contains( in testEntrySet_contains()
86 getMultiset().entrySet().contains( in testEntrySet_contains_count0()
92 getMultiset().entrySet().contains(samples.e0)); in testEntrySet_contains_nonentry()
97 getMultiset().entrySet(), getMultiset().entrySet()); in testEntrySet_twice()
103 0, getMultiset().entrySet().hashCode()); in testEntrySet_hashCode_size0()
109 1 ^ samples.e0.hashCode(), getMultiset().entrySet().hashCode()); in testEntrySet_hashCode_size1()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DMaps.java358 for (Entry<? extends K, ? extends V> entry : left.entrySet()) { in difference()
547 for (Entry<? extends K, ? extends V> entry : left.entrySet()) { in difference()
705 Set<Entry<K, V>> entrySet) { in unmodifiableEntrySet() argument
707 Collections.unmodifiableSet(entrySet)); in unmodifiableEntrySet()
1173 Set<Entry<K, V2>> entrySet;
1175 @Override public Set<Entry<K, V2>> entrySet() {
1176 Set<Entry<K, V2>> result = entrySet;
1178 entrySet = result = new EntrySet<K, V2>() {
1185 fromMap.entrySet().iterator();
1554 for (Entry<? extends K, ? extends V> entry : map.entrySet()) {
[all …]

123456789