Home
last modified time | relevance | path

Searched refs:asMap (Results 1 – 25 of 157) sorted by relevance

1234567

/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderGwtTest.java215 ConcurrentMap<Integer, Integer> asMap = cache.asMap(); in testMapMethods() local
220 asMap.replace(2, 79); in testMapMethods()
221 asMap.replace(3, 60); in testMapMethods()
224 assertEquals(null, asMap.get(3)); in testMapMethods()
227 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods()
229 asMap.replace(10, 100, 50); in testMapMethods()
230 asMap.replace(2, 52, 99); in testMapMethods()
233 assertEquals(Integer.valueOf(50), asMap.get(10)); in testMapMethods()
235 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods()
237 asMap.remove(10, 100); in testMapMethods()
[all …]
DCacheManualTest.java46 assertNull(cache.asMap().get(one)); in testGetIfPresent()
47 assertFalse(cache.asMap().containsKey(one)); in testGetIfPresent()
48 assertFalse(cache.asMap().containsValue(two)); in testGetIfPresent()
56 assertNull(cache.asMap().get(two)); in testGetIfPresent()
57 assertFalse(cache.asMap().containsKey(two)); in testGetIfPresent()
58 assertFalse(cache.asMap().containsValue(one)); in testGetIfPresent()
68 assertSame(two, cache.asMap().get(one)); in testGetIfPresent()
69 assertTrue(cache.asMap().containsKey(one)); in testGetIfPresent()
70 assertTrue(cache.asMap().containsValue(two)); in testGetIfPresent()
78 assertNull(cache.asMap().get(two)); in testGetIfPresent()
[all …]
DPopulatedCachesTest.java61 assertMapSize(cache.asMap(), WARMUP_SIZE); in testSize_populated()
72 assertTrue(cache.asMap().containsKey(entry.getKey())); in testContainsKey_found()
73 assertTrue(cache.asMap().containsValue(entry.getValue())); in testContainsKey_found()
89 assertSame(entry.getValue(), cache.asMap().put(entry.getKey(), newValue)); in testPut_populated()
93 assertNull(cache.asMap().put(newKey, entry.getValue())); in testPut_populated()
112 assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue)); in testPutIfAbsent_populated()
114 assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue())); in testPutIfAbsent_populated()
132 cache.asMap().putAll(ImmutableMap.of(newKey, newValue)); in testPutAll_populated()
147 assertSame(entry.getValue(), cache.asMap().replace(entry.getKey(), newValue)); in testReplace_populated()
148 assertTrue(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())); in testReplace_populated()
[all …]
DCacheReferencesTest.java68 assertTrue(cache.asMap().containsKey(key));
69 assertTrue(cache.asMap().containsValue(value));
79 assertFalse(cache.asMap().isEmpty());
82 assertTrue(cache.asMap().isEmpty());
83 assertFalse(cache.asMap().containsKey(key));
84 assertFalse(cache.asMap().containsValue(value));
96 assertEquals(ImmutableSet.of(key1, key2), cache.asMap().keySet());
97 assertThat(cache.asMap().values()).has().exactly(value1, value2);
99 cache.asMap().entrySet());
112 assertFalse(cache.asMap().containsKey(key1));
[all …]
DEmptyCachesTest.java118 Set<Object> keys = cache.asMap().keySet(); in testKeySet_nullToArray()
132 cache.asMap().keySet().add(1); in testKeySet_addNotSupported()
139 cache.asMap().keySet().addAll(asList(1, 2)); in testKeySet_addNotSupported()
151 Set<Object> keys = cache.asMap().keySet(); in testKeySet_clear()
160 Set<Object> keys = cache.asMap().keySet(); in testKeySet_empty_remove()
176 Set<Object> keys = cache.asMap().keySet(); in testKeySet_remove()
195 Collection<Object> values = cache.asMap().values(); in testValues_nullToArray()
209 cache.asMap().values().add(1); in testValues_addNotSupported()
216 cache.asMap().values().addAll(asList(1, 2)); in testValues_addNotSupported()
228 Collection<Object> values = cache.asMap().values(); in testValues_clear()
[all …]
DCacheExpirationTest.java142 assertEquals(1, Iterators.size(cache.asMap().entrySet().iterator())); in runExpirationTest()
143 assertEquals(1, Iterators.size(cache.asMap().keySet().iterator())); in runExpirationTest()
144 assertEquals(1, Iterators.size(cache.asMap().values().iterator())); in runExpirationTest()
149 assertFalse(cache.asMap().containsKey(KEY_PREFIX + i)); in runExpirationTest()
154 assertFalse(cache.asMap().containsKey(KEY_PREFIX + i)); in runExpirationTest()
262 Set<Integer> keySet = cache.asMap().keySet(); in testExpirationOrder_access()
314 Set<Integer> keySet = cache.asMap().keySet(); in testExpirationOrder_write()
334 cache.asMap().put(3, -3); in testExpirationOrder_write()
339 cache.asMap().replace(4, -4); in testExpirationOrder_write()
367 Set<Integer> keySet = cache.asMap().keySet(); in testExpirationOrder_writeAccess()
[all …]
/external/guava/guava/src/com/google/common/collect/
DAbstractMultimap.java46 for (Collection<V> collection : asMap().values()) { in containsValue()
57 Collection<V> collection = asMap().get(key); in containsEntry()
63 Collection<V> collection = asMap().get(key); in remove()
154 return new Maps.KeySet<K, Collection<V>>(asMap()); in createKeySet()
203 private transient Map<K, Collection<V>> asMap; field in AbstractMultimap
206 public Map<K, Collection<V>> asMap() { in asMap() method in AbstractMultimap
207 Map<K, Collection<V>> result = asMap; in asMap()
208 return (result == null) ? asMap = createAsMap() : result; in asMap()
228 return asMap().hashCode(); in hashCode()
239 return asMap().toString(); in toString()
DFilteredEntryMultimap.java99 return asMap().get(key) != null; in containsKey()
104 return MoreObjects.firstNonNull(asMap().remove(key), unmodifiableEmptyCollection()); in removeAll()
146 return asMap().keySet(); in keySet()
150 Iterator<Entry<K, Collection<V>>> entryIterator = unfiltered.asMap().entrySet().iterator(); in removeEntriesIf()
181 Collection<V> result = unfiltered.asMap().get(key); in get()
193 Collection<V> collection = unfiltered.asMap().get(key); in remove()
249 = unfiltered.asMap().entrySet().iterator(); in createEntrySet()
292 = unfiltered.asMap().entrySet().iterator();
340 Collection<V> collection = unfiltered.asMap().get(key);
DMultimaps.java512 @Override public Map<K, Collection<V>> asMap() { in asMap() method in Multimaps.UnmodifiableMultimap
516 Maps.transformValues(delegate.asMap(), new Function<Collection<V>, Collection<V>>() { in asMap()
862 public static <K, V> Map<K, List<V>> asMap(ListMultimap<K, V> multimap) { in asMap() method in Multimaps
863 return (Map<K, List<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
875 public static <K, V> Map<K, Set<V>> asMap(SetMultimap<K, V> multimap) { in asMap() method in Multimaps
876 return (Map<K, Set<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
889 public static <K, V> Map<K, SortedSet<V>> asMap( in asMap() method in Multimaps
891 return (Map<K, SortedSet<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
901 public static <K, V> Map<K, Collection<V>> asMap(Multimap<K, V> multimap) { in asMap() method in Multimaps
902 return multimap.asMap(); in asMap()
[all …]
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DMultimapAsMapGetTester.java50 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testPropagatesRemoveToMultimap()
59 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testPropagatesRemoveLastElementToMultimap()
67 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testPropagatesClearToMultimap()
76 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testAddNullValue()
84 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testRemoveNullValue()
91 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testAddNullValueUnsupported()
101 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testPropagatesAddToMultimap()
115 Collection<V> result = multimap().asMap().get(k0); in testPropagatesRemoveThenAddToMultimap()
139 Collection<V> result = multimap().asMap().get(sampleKeys().e0); in testReflectsMultimapRemove()
DMultimapAsMapTester.java57 Collection<V> collection = multimap().asMap().get(key); in testAsMapGet()
70 assertThat(multimap().asMap().get(null)).has().exactly(getValueForNullKey()); in testAsMapGetNullKeyPresent()
75 assertThat(multimap().asMap().get(null)).isNull(); in testAsMapGetNullKeyAbsent()
81 multimap().asMap().get(null); in testAsMapGetNullKeyUnsupported()
89 assertThat(multimap().asMap().remove(sampleKeys().e0)).iteratesAs(sampleValues().e0); in testAsMapRemove()
101 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutSameKey()
117 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutDifferentKey()
128 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetRemovePropagatesToMultimap()
142 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetIteratorRemovePropagatesToMultimap()
DSetMultimapAsMapTester.java47 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementSet()
54 assertTrue(multimap().asMap().get(key) instanceof Set); in testAsMapGetImplementsSet()
63 assertTrue(multimap().asMap().remove(key) instanceof Set); in testAsMapRemoveImplementsSet()
77 .addEqualityGroup(expected, multimap().asMap()) in testEquals()
95 .addEqualityGroup(expected, multimap().asMap().entrySet()) in testEntrySetEquals()
106 assertTrue(multimap().asMap().values().remove(Collections.singleton(sampleValues().e0))); in testValuesRemove()
111 multimap().asMap()); in testValuesRemove()
DListMultimapAsMapTester.java47 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementList()
54 assertTrue(multimap().asMap().get(key) instanceof List); in testAsMapGetImplementsList()
63 assertTrue(multimap().asMap().remove(key) instanceof List); in testAsMapRemoveImplementsList()
77 .addEqualityGroup(expected, multimap().asMap()) in testEquals()
95 .addEqualityGroup(expected, multimap().asMap().entrySet()) in testEntrySetEquals()
106 assertTrue(multimap().asMap().values().remove(Collections.singletonList(sampleValues().e0))); in testValuesRemove()
111 multimap().asMap()); in testValuesRemove()
DMultimapClearTester.java53 assertThat(multimap().asMap()).isEmpty(); in assertCleared()
76 multimap().asMap().clear(); in testClearThroughAsMap()
114 Collection<V> collection = multimap().asMap().get(key); in testClearPropagatesToAsMapGet()
124 Map<K, Collection<V>> asMap = multimap().asMap(); in testClearPropagatesToAsMap() local
126 assertThat(asMap).isEmpty(); in testClearPropagatesToAsMap()
DUnmodifiableCollectionTests.java289 multimap.asMap().entrySet(), in assertMultimapIsUnmodifiable()
297 multimap.asMap().entrySet().iterator().next().getValue(); in assertMultimapIsUnmodifiable()
381 multimap.asMap().remove(sampleKey); in assertMultimapIsUnmodifiable()
390 multimap.asMap().get(presentKey).remove(sampleValue); in assertMultimapIsUnmodifiable()
397 multimap.asMap().values().iterator().next().remove(sampleValue); in assertMultimapIsUnmodifiable()
404 ((Collection<?>) multimap.asMap().values().toArray()[0]).clear(); in assertMultimapIsUnmodifiable()
DSortedSetMultimapAsMapTester.java39 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementSortedSet()
47 SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key); in testAsMapGetImplementsSortedSet()
57 SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().remove(key); in testAsMapRemoveImplementsSortedSet()
/external/desugar/java/com/google/devtools/common/options/
DOptionsBase.java67 public final <O extends OptionsBase> Map<String, Object> asMap() { in asMap() method in OptionsBase
86 return getClass().getName() + asMap(); in toString()
96 for (Entry<String, Object> entry : asMap().entrySet()) { in cacheKey()
122 this.asMap().equals(((OptionsBase) that).asMap()); in equals()
127 return this.getClass().hashCode() + asMap().hashCode(); in hashCode()
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DTreeMultimapNaturalTest.java84 multimap.asMap().entrySet().iterator(); in testOrderedAsMapEntries()
190 SortedMap<String, Collection<Integer>> asMap = multimap.asMap(); in testTreeMultimapAsMapSorted() local
191 assertEquals(Ordering.natural(), asMap.comparator()); in testTreeMultimapAsMapSorted()
192 assertEquals("foo", asMap.firstKey()); in testTreeMultimapAsMapSorted()
193 assertEquals("tree", asMap.lastKey()); in testTreeMultimapAsMapSorted()
198 asMap.tailMap("g")); in testTreeMultimapAsMapSorted()
200 asMap.headMap("h")); in testTreeMultimapAsMapSorted()
202 asMap.subMap("g", "h")); in testTreeMultimapAsMapSorted()
DMultimapsTest.java202 unmodifiable.asMap().entrySet(), multimap.asMap().entrySet()); in checkUnmodifiableMultimap()
208 assertThat(unmodifiable.asMap().get("bar")).has().exactly(5, -1); in checkUnmodifiableMultimap()
209 assertNull(unmodifiable.asMap().get("missing")); in checkUnmodifiableMultimap()
291 Map<String, Collection<Integer>> map = Multimaps.asMap(multimap); in testAsMap_multimap()
292 assertSame(multimap.asMap(), map); in testAsMap_multimap()
297 Map<String, List<Integer>> map = Multimaps.asMap(listMultimap); in testAsMap_listMultimap()
298 assertSame(listMultimap.asMap(), map); in testAsMap_listMultimap()
303 Map<String, Set<Integer>> map = Multimaps.asMap(setMultimap); in testAsMap_setMultimap()
304 assertSame(setMultimap.asMap(), map); in testAsMap_setMultimap()
310 Map<String, SortedSet<Integer>> map = Multimaps.asMap(sortedSetMultimap); in testAsMap_sortedSetMultimap()
[all …]
DMapConstraintsTest.java233 assertThat(constrained.asMap().get("foo")).has().item(1); in testConstrainedMultimapLegal()
234 assertNull(constrained.asMap().get("missing")); in testConstrainedMultimapLegal()
235 assertEquals(multimap.asMap(), constrained.asMap()); in testConstrainedMultimapLegal()
254 assertFalse(constrained.asMap().values() instanceof Serializable); in testConstrainedMultimapLegal()
256 constrained.asMap().values().iterator(); in testConstrainedMultimapLegal()
269 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingList()
282 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingRandomAccessList()
295 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingSet()
308 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingSortedSet()
396 constrained.asMap().get("foo").add(TEST_VALUE); in testConstrainedMultimapIllegal()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DMapConstraintsTest.java235 assertThat(constrained.asMap().get("foo")).has().item(1); in testConstrainedMultimapLegal()
236 assertNull(constrained.asMap().get("missing")); in testConstrainedMultimapLegal()
237 assertEquals(multimap.asMap(), constrained.asMap()); in testConstrainedMultimapLegal()
256 assertFalse(constrained.asMap().values() instanceof Serializable); in testConstrainedMultimapLegal()
258 constrained.asMap().values().iterator(); in testConstrainedMultimapLegal()
271 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingList()
284 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingRandomAccessList()
297 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingSet()
310 = multimap.asMap().entrySet().iterator().next(); in testConstrainedTypePreservingSortedSet()
398 constrained.asMap().get("foo").add(TEST_VALUE); in testConstrainedMultimapIllegal()
[all …]
DMultimapsTest.java294 unmodifiable.asMap().entrySet(), multimap.asMap().entrySet()); in checkUnmodifiableMultimap()
300 assertThat(unmodifiable.asMap().get("bar")).has().exactly(5, -1); in checkUnmodifiableMultimap()
301 assertNull(unmodifiable.asMap().get("missing")); in checkUnmodifiableMultimap()
383 Map<String, Collection<Integer>> map = Multimaps.asMap(multimap); in testAsMap_multimap()
384 assertSame(multimap.asMap(), map); in testAsMap_multimap()
389 Map<String, List<Integer>> map = Multimaps.asMap(listMultimap); in testAsMap_listMultimap()
390 assertSame(listMultimap.asMap(), map); in testAsMap_listMultimap()
395 Map<String, Set<Integer>> map = Multimaps.asMap(setMultimap); in testAsMap_setMultimap()
396 assertSame(setMultimap.asMap(), map); in testAsMap_setMultimap()
402 Map<String, SortedSet<Integer>> map = Multimaps.asMap(sortedSetMultimap); in testAsMap_sortedSetMultimap()
[all …]
DTreeMultimapNaturalTest.java178 return multimap.asMap(); in suite()
236 return (Set<String>) multimap.asMap().entrySet().iterator().next().getValue(); in suite()
299 multimap.asMap().entrySet().iterator(); in testOrderedAsMapEntries()
460 SortedMap<String, Collection<Integer>> asMap = multimap.asMap(); in testTreeMultimapAsMapSorted() local
461 assertEquals(Ordering.natural(), asMap.comparator()); in testTreeMultimapAsMapSorted()
462 assertEquals("foo", asMap.firstKey()); in testTreeMultimapAsMapSorted()
463 assertEquals("tree", asMap.lastKey()); in testTreeMultimapAsMapSorted()
468 asMap.tailMap("g")); in testTreeMultimapAsMapSorted()
470 asMap.headMap("h")); in testTreeMultimapAsMapSorted()
472 asMap.subMap("g", "h")); in testTreeMultimapAsMapSorted()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DMultimaps.java423 @Override public Map<K, Collection<V>> asMap() { in asMap() method in Multimaps.UnmodifiableMultimap
427 Maps.transformValues(delegate.asMap(), new Function<Collection<V>, Collection<V>>() { in asMap()
773 public static <K, V> Map<K, List<V>> asMap(ListMultimap<K, V> multimap) { in asMap() method in Multimaps
774 return (Map<K, List<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
786 public static <K, V> Map<K, Set<V>> asMap(SetMultimap<K, V> multimap) { in asMap() method in Multimaps
787 return (Map<K, Set<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
800 public static <K, V> Map<K, SortedSet<V>> asMap( in asMap() method in Multimaps
802 return (Map<K, SortedSet<V>>) (Map<K, ?>) multimap.asMap(); in asMap()
812 public static <K, V> Map<K, Collection<V>> asMap(Multimap<K, V> multimap) { in asMap() method in Multimaps
813 return multimap.asMap(); in asMap()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DAtomicLongMap.java279 private transient Map<K, Long> asMap; field in AtomicLongMap
284 public Map<K, Long> asMap() { in asMap() method in AtomicLongMap
285 Map<K, Long> result = asMap; in asMap()
286 return (result == null) ? asMap = createAsMap() : result; in asMap()

1234567