/external/guava/android/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderGwtTest.java | 212 ConcurrentMap<Integer, Integer> asMap = cache.asMap(); in testMapMethods() local 217 asMap.replace(2, 79); in testMapMethods() 218 asMap.replace(3, 60); in testMapMethods() 221 assertEquals(null, asMap.get(3)); in testMapMethods() 224 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods() 226 asMap.replace(10, 100, 50); in testMapMethods() 227 asMap.replace(2, 52, 99); in testMapMethods() 230 assertEquals(Integer.valueOf(50), asMap.get(10)); in testMapMethods() 232 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods() 234 asMap.remove(10, 100); in testMapMethods() [all …]
|
D | CacheManualTest.java | 43 assertNull(cache.asMap().get(one)); in testGetIfPresent() 44 assertFalse(cache.asMap().containsKey(one)); in testGetIfPresent() 45 assertFalse(cache.asMap().containsValue(two)); in testGetIfPresent() 53 assertNull(cache.asMap().get(two)); in testGetIfPresent() 54 assertFalse(cache.asMap().containsKey(two)); in testGetIfPresent() 55 assertFalse(cache.asMap().containsValue(one)); in testGetIfPresent() 65 assertSame(two, cache.asMap().get(one)); in testGetIfPresent() 66 assertTrue(cache.asMap().containsKey(one)); in testGetIfPresent() 67 assertTrue(cache.asMap().containsValue(two)); in testGetIfPresent() 75 assertNull(cache.asMap().get(two)); in testGetIfPresent() [all …]
|
D | CacheReferencesTest.java | 69 assertTrue(cache.asMap().containsKey(key)); 70 assertTrue(cache.asMap().containsValue(value)); 80 assertFalse(cache.asMap().isEmpty()); 83 assertTrue(cache.asMap().isEmpty()); 84 assertFalse(cache.asMap().containsKey(key)); 85 assertFalse(cache.asMap().containsValue(value)); 97 assertEquals(ImmutableSet.of(key1, key2), cache.asMap().keySet()); 98 assertThat(cache.asMap().values()).containsExactly(value1, value2); 101 cache.asMap().entrySet()); 114 assertFalse(cache.asMap().containsKey(key1)); [all …]
|
D | PopulatedCachesTest.java | 59 assertMapSize(cache.asMap(), WARMUP_SIZE); in testSize_populated() 70 assertTrue(cache.asMap().containsKey(entry.getKey())); in testContainsKey_found() 71 assertTrue(cache.asMap().containsValue(entry.getValue())); in testContainsKey_found() 87 assertSame(entry.getValue(), cache.asMap().put(entry.getKey(), newValue)); in testPut_populated() 91 assertNull(cache.asMap().put(newKey, entry.getValue())); in testPut_populated() 110 assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue)); in testPutIfAbsent_populated() 112 assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue())); in testPutIfAbsent_populated() 130 cache.asMap().putAll(ImmutableMap.of(newKey, newValue)); in testPutAll_populated() 145 assertSame(entry.getValue(), cache.asMap().replace(entry.getKey(), newValue)); in testReplace_populated() 146 assertTrue(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())); in testReplace_populated() [all …]
|
D | EmptyCachesTest.java | 114 Set<Object> keys = cache.asMap().keySet(); in testKeySet_nullToArray() 127 cache.asMap().keySet().add(1); in testKeySet_addNotSupported() 133 cache.asMap().keySet().addAll(asList(1, 2)); in testKeySet_addNotSupported() 144 Set<Object> keys = cache.asMap().keySet(); in testKeySet_clear() 153 Set<Object> keys = cache.asMap().keySet(); in testKeySet_empty_remove() 169 Set<Object> keys = cache.asMap().keySet(); in testKeySet_remove() 188 Collection<Object> values = cache.asMap().values(); in testValues_nullToArray() 201 cache.asMap().values().add(1); in testValues_addNotSupported() 207 cache.asMap().values().addAll(asList(1, 2)); in testValues_addNotSupported() 218 Collection<Object> values = cache.asMap().values(); in testValues_clear() [all …]
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderGwtTest.java | 212 ConcurrentMap<Integer, Integer> asMap = cache.asMap(); in testMapMethods() local 217 asMap.replace(2, 79); in testMapMethods() 218 asMap.replace(3, 60); in testMapMethods() 221 assertEquals(null, asMap.get(3)); in testMapMethods() 224 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods() 226 asMap.replace(10, 100, 50); in testMapMethods() 227 asMap.replace(2, 52, 99); in testMapMethods() 230 assertEquals(Integer.valueOf(50), asMap.get(10)); in testMapMethods() 232 assertEquals(Integer.valueOf(79), asMap.get(2)); in testMapMethods() 234 asMap.remove(10, 100); in testMapMethods() [all …]
|
D | LocalCacheMapComputeTest.java | 53 cache.asMap().computeIfAbsent(key, k -> "value" + n); in testComputeIfAbsent() 63 assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo(""); in testComputeIfAbsentEviction() 64 assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo(""); in testComputeIfAbsentEviction() 65 assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo(""); in testComputeIfAbsentEviction() 67 assertThat(c.asMap().computeIfAbsent("hash-2", k -> "")).isEqualTo(""); in testComputeIfAbsentEviction() 75 assertThat(c.asMap().compute("hash-1", (k, v) -> "a")).isEqualTo("a"); in testComputeEviction() 76 assertThat(c.asMap().compute("hash-1", (k, v) -> "b")).isEqualTo("b"); in testComputeEviction() 77 assertThat(c.asMap().compute("hash-1", (k, v) -> "c")).isEqualTo("c"); in testComputeEviction() 79 assertThat(c.asMap().computeIfAbsent("hash-2", k -> "")).isEqualTo(""); in testComputeEviction() 88 cache.asMap().computeIfPresent(key, (k, v) -> v + delimiter + n); in testComputeIfPresent() [all …]
|
D | CacheManualTest.java | 43 assertNull(cache.asMap().get(one)); in testGetIfPresent() 44 assertFalse(cache.asMap().containsKey(one)); in testGetIfPresent() 45 assertFalse(cache.asMap().containsValue(two)); in testGetIfPresent() 53 assertNull(cache.asMap().get(two)); in testGetIfPresent() 54 assertFalse(cache.asMap().containsKey(two)); in testGetIfPresent() 55 assertFalse(cache.asMap().containsValue(one)); in testGetIfPresent() 65 assertSame(two, cache.asMap().get(one)); in testGetIfPresent() 66 assertTrue(cache.asMap().containsKey(one)); in testGetIfPresent() 67 assertTrue(cache.asMap().containsValue(two)); in testGetIfPresent() 75 assertNull(cache.asMap().get(two)); in testGetIfPresent() [all …]
|
D | CacheReferencesTest.java | 69 assertTrue(cache.asMap().containsKey(key)); 70 assertTrue(cache.asMap().containsValue(value)); 80 assertFalse(cache.asMap().isEmpty()); 83 assertTrue(cache.asMap().isEmpty()); 84 assertFalse(cache.asMap().containsKey(key)); 85 assertFalse(cache.asMap().containsValue(value)); 97 assertEquals(ImmutableSet.of(key1, key2), cache.asMap().keySet()); 98 assertThat(cache.asMap().values()).containsExactly(value1, value2); 101 cache.asMap().entrySet()); 114 assertFalse(cache.asMap().containsKey(key1)); [all …]
|
D | PopulatedCachesTest.java | 59 assertMapSize(cache.asMap(), WARMUP_SIZE); in testSize_populated() 70 assertTrue(cache.asMap().containsKey(entry.getKey())); in testContainsKey_found() 71 assertTrue(cache.asMap().containsValue(entry.getValue())); in testContainsKey_found() 87 assertSame(entry.getValue(), cache.asMap().put(entry.getKey(), newValue)); in testPut_populated() 91 assertNull(cache.asMap().put(newKey, entry.getValue())); in testPut_populated() 110 assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue)); in testPutIfAbsent_populated() 112 assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue())); in testPutIfAbsent_populated() 130 cache.asMap().putAll(ImmutableMap.of(newKey, newValue)); in testPutAll_populated() 145 assertSame(entry.getValue(), cache.asMap().replace(entry.getKey(), newValue)); in testReplace_populated() 146 assertTrue(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())); in testReplace_populated() [all …]
|
D | EmptyCachesTest.java | 114 Set<Object> keys = cache.asMap().keySet(); in testKeySet_nullToArray() 127 cache.asMap().keySet().add(1); in testKeySet_addNotSupported() 133 cache.asMap().keySet().addAll(asList(1, 2)); in testKeySet_addNotSupported() 144 Set<Object> keys = cache.asMap().keySet(); in testKeySet_clear() 153 Set<Object> keys = cache.asMap().keySet(); in testKeySet_empty_remove() 169 Set<Object> keys = cache.asMap().keySet(); in testKeySet_remove() 188 Collection<Object> values = cache.asMap().values(); in testValues_nullToArray() 201 cache.asMap().values().add(1); in testValues_addNotSupported() 207 cache.asMap().values().addAll(asList(1, 2)); in testValues_addNotSupported() 218 Collection<Object> values = cache.asMap().values(); in testValues_clear() [all …]
|
D | CacheEvictionTest.java | 156 assertThat(cache.asMap().keySet()).isEmpty(); in testEviction_maxWeight_zero() 163 assertThat(cache.asMap().keySet()).containsExactly(2); in testEviction_maxWeight_zero() 171 assertThat(cache.asMap().keySet()).containsExactly(2, 4); in testEviction_maxWeight_zero() 178 assertThat(cache.asMap().keySet()).containsExactly(2, 4); in testEviction_maxWeight_zero() 205 assertThat(cache.asMap().keySet()).containsExactly(2); in testEviction_maxWeight_entryTooBig() 212 assertThat(cache.asMap().keySet()).containsExactly(3); in testEviction_maxWeight_entryTooBig() 219 assertThat(cache.asMap().keySet()).containsExactly(3); in testEviction_maxWeight_entryTooBig() 226 assertThat(cache.asMap().keySet()).containsExactly(3, 1); in testEviction_maxWeight_entryTooBig() 233 assertThat(cache.asMap().keySet()).containsExactly(4); in testEviction_maxWeight_entryTooBig() 295 Set<Integer> keySet = cache.asMap().keySet(); in testEviction_lru() [all …]
|
/external/desugar/java/com/google/devtools/common/options/ |
D | OptionsBase.java | 66 public final <O extends OptionsBase> Map<String, Object> asMap() { in asMap() method in OptionsBase 85 return getClass().getName() + asMap(); in toString() 95 for (Map.Entry<String, Object> entry : asMap().entrySet()) { in cacheKey() 121 this.asMap().equals(((OptionsBase) that).asMap()); in equals() 126 return this.getClass().hashCode() + asMap().hashCode(); in hashCode()
|
/external/guava/android/guava-testlib/src/com/google/common/collect/testing/google/ |
D | MultimapAsMapGetTester.java | 50 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveToMultimap() 59 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveLastElementToMultimap() 67 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesClearToMultimap() 76 Collection<V> result = multimap().asMap().get(k0()); in testAddNullValue() 84 Collection<V> result = multimap().asMap().get(k0()); in testRemoveNullValue() 91 Collection<V> result = multimap().asMap().get(k0()); in testAddNullValueUnsupported() 102 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesAddToMultimap() 112 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveThenAddToMultimap() 133 Collection<V> result = multimap().asMap().get(k0()); in testReflectsMultimapRemove()
|
D | ListMultimapAsMapTester.java | 48 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementList() 55 assertTrue(multimap().asMap().get(key) instanceof List); in testAsMapGetImplementsList() 64 assertTrue(multimap().asMap().remove(key) instanceof List); in testAsMapRemoveImplementsList() 75 new EqualsTester().addEqualityGroup(expected, multimap().asMap()).testEquals(); in testEquals() 85 new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); in testEntrySetEquals() 93 assertTrue(multimap().asMap().values().remove(Collections.singletonList(v0()))); in testValuesRemove() 96 Collections.singletonMap(k0(), Lists.newArrayList(v0(), v3())), multimap().asMap()); in testValuesRemove()
|
D | MultimapAsMapTester.java | 60 Collection<V> collection = multimap().asMap().get(key); in testAsMapGet() 73 assertContentsAnyOrder(multimap().asMap().get(null), getValueForNullKey()); in testAsMapGetNullKeyPresent() 78 assertNull(multimap().asMap().get(null)); in testAsMapGetNullKeyAbsent() 84 multimap().asMap().get(null); in testAsMapGetNullKeyUnsupported() 93 assertContentsInOrder(multimap().asMap().remove(k0()), v0()); in testAsMapRemove() 103 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutSameKey() 115 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutDifferentKey() 124 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetRemovePropagatesToMultimap() 136 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetIteratorRemovePropagatesToMultimap()
|
D | SetMultimapAsMapTester.java | 48 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementSet() 55 assertTrue(multimap().asMap().get(key) instanceof Set); in testAsMapGetImplementsSet() 64 assertTrue(multimap().asMap().remove(key) instanceof Set); in testAsMapRemoveImplementsSet() 75 new EqualsTester().addEqualityGroup(expected, multimap().asMap()).testEquals(); in testEquals() 85 new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); in testEntrySetEquals() 93 assertTrue(multimap().asMap().values().remove(Collections.singleton(v0()))); in testValuesRemove() 95 assertEquals(Collections.singletonMap(k0(), Sets.newHashSet(v0(), v3())), multimap().asMap()); in testValuesRemove()
|
D | MultimapClearTester.java | 56 assertEmpty(multimap().asMap()); in assertCleared() 79 multimap().asMap().clear(); in testClearThroughAsMap() 117 Collection<V> collection = multimap().asMap().get(key); in testClearPropagatesToAsMapGet() 127 Map<K, Collection<V>> asMap = multimap().asMap(); in testClearPropagatesToAsMap() local 129 assertEmpty(asMap); in testClearPropagatesToAsMap()
|
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/ |
D | MultimapAsMapGetTester.java | 50 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveToMultimap() 59 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveLastElementToMultimap() 67 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesClearToMultimap() 76 Collection<V> result = multimap().asMap().get(k0()); in testAddNullValue() 84 Collection<V> result = multimap().asMap().get(k0()); in testRemoveNullValue() 91 Collection<V> result = multimap().asMap().get(k0()); in testAddNullValueUnsupported() 102 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesAddToMultimap() 112 Collection<V> result = multimap().asMap().get(k0()); in testPropagatesRemoveThenAddToMultimap() 133 Collection<V> result = multimap().asMap().get(k0()); in testReflectsMultimapRemove()
|
D | ListMultimapAsMapTester.java | 48 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementList() 55 assertTrue(multimap().asMap().get(key) instanceof List); in testAsMapGetImplementsList() 64 assertTrue(multimap().asMap().remove(key) instanceof List); in testAsMapRemoveImplementsList() 75 new EqualsTester().addEqualityGroup(expected, multimap().asMap()).testEquals(); in testEquals() 85 new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); in testEntrySetEquals() 93 assertTrue(multimap().asMap().values().remove(Collections.singletonList(v0()))); in testValuesRemove() 96 Collections.singletonMap(k0(), Lists.newArrayList(v0(), v3())), multimap().asMap()); in testValuesRemove()
|
D | MultimapAsMapTester.java | 60 Collection<V> collection = multimap().asMap().get(key); in testAsMapGet() 73 assertContentsAnyOrder(multimap().asMap().get(null), getValueForNullKey()); in testAsMapGetNullKeyPresent() 78 assertNull(multimap().asMap().get(null)); in testAsMapGetNullKeyAbsent() 84 multimap().asMap().get(null); in testAsMapGetNullKeyUnsupported() 93 assertContentsInOrder(multimap().asMap().remove(k0()), v0()); in testAsMapRemove() 103 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutSameKey() 115 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetReflectsPutDifferentKey() 124 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetRemovePropagatesToMultimap() 136 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); in testAsMapEntrySetIteratorRemovePropagatesToMultimap()
|
D | SetMultimapAsMapTester.java | 48 for (Collection<V> valueCollection : multimap().asMap().values()) { in testAsMapValuesImplementSet() 55 assertTrue(multimap().asMap().get(key) instanceof Set); in testAsMapGetImplementsSet() 64 assertTrue(multimap().asMap().remove(key) instanceof Set); in testAsMapRemoveImplementsSet() 75 new EqualsTester().addEqualityGroup(expected, multimap().asMap()).testEquals(); in testEquals() 85 new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); in testEntrySetEquals() 93 assertTrue(multimap().asMap().values().remove(Collections.singleton(v0()))); in testValuesRemove() 95 assertEquals(Collections.singletonMap(k0(), Sets.newHashSet(v0(), v3())), multimap().asMap()); in testValuesRemove()
|
D | MultimapClearTester.java | 56 assertEmpty(multimap().asMap()); in assertCleared() 79 multimap().asMap().clear(); in testClearThroughAsMap() 117 Collection<V> collection = multimap().asMap().get(key); in testClearPropagatesToAsMapGet() 127 Map<K, Collection<V>> asMap = multimap().asMap(); in testClearPropagatesToAsMap() local 129 assertEmpty(asMap); in testClearPropagatesToAsMap()
|
/external/guava/android/guava/src/com/google/common/collect/ |
D | AbstractMultimap.java | 46 for (Collection<V> collection : asMap().values()) { in containsValue() 57 Collection<V> collection = asMap().get(key); in containsEntry() 64 Collection<V> collection = asMap().get(key); in remove() 203 @NullableDecl 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() 230 return asMap().hashCode(); in hashCode() 241 return asMap().toString(); in toString()
|
/external/guava/guava/src/com/google/common/collect/ |
D | AbstractMultimap.java | 48 for (Collection<V> collection : asMap().values()) { in containsValue() 59 Collection<V> collection = asMap().get(key); in containsEntry() 66 Collection<V> collection = asMap().get(key); in remove() 224 private transient @Nullable Map<K, Collection<V>> asMap; field in AbstractMultimap 227 public Map<K, Collection<V>> asMap() { in asMap() method in AbstractMultimap 228 Map<K, Collection<V>> result = asMap; in asMap() 229 return (result == null) ? asMap = createAsMap() : result; in asMap() 251 return asMap().hashCode(); in hashCode() 262 return asMap().toString(); in toString()
|