Searched refs:asMap (Results 1 - 25 of 117) sorted by relevance

12345

/external/guava/guava-tests/test/com/google/common/cache/
H A DCacheManualTest.java46 assertNull(cache.asMap().get(one));
47 assertFalse(cache.asMap().containsKey(one));
48 assertFalse(cache.asMap().containsValue(two));
56 assertNull(cache.asMap().get(two));
57 assertFalse(cache.asMap().containsKey(two));
58 assertFalse(cache.asMap().containsValue(one));
68 assertSame(two, cache.asMap().get(one));
69 assertTrue(cache.asMap().containsKey(one));
70 assertTrue(cache.asMap().containsValue(two));
78 assertNull(cache.asMap()
[all...]
H A DCacheBuilderGwtTest.java215 ConcurrentMap<Integer, Integer> asMap = cache.asMap();
220 asMap.replace(2, 79);
221 asMap.replace(3, 60);
224 assertEquals(null, asMap.get(3));
227 assertEquals(Integer.valueOf(79), asMap.get(2));
229 asMap.replace(10, 100, 50);
230 asMap.replace(2, 52, 99);
233 assertEquals(Integer.valueOf(50), asMap.get(10));
235 assertEquals(Integer.valueOf(79), asMap
[all...]
H A 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 ASSERT.that(cache.asMap().values()).has().exactly(value1, value2);
99 cache.asMap().entrySet());
112 assertFalse(cache.asMap()
[all...]
H A DPopulatedCachesTest.java62 assertMapSize(cache.asMap(), WARMUP_SIZE);
73 assertTrue(cache.asMap().containsKey(entry.getKey()));
74 assertTrue(cache.asMap().containsValue(entry.getValue()));
90 assertSame(entry.getValue(), cache.asMap().put(entry.getKey(), newValue));
94 assertNull(cache.asMap().put(newKey, entry.getValue()));
113 assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue));
115 assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue()));
133 cache.asMap().putAll(ImmutableMap.of(newKey, newValue));
148 assertSame(entry.getValue(), cache.asMap().replace(entry.getKey(), newValue));
149 assertTrue(cache.asMap()
[all...]
H A DEmptyCachesTest.java117 Set<Object> keys = cache.asMap().keySet();
131 cache.asMap().keySet().add(1);
138 cache.asMap().keySet().addAll(asList(1, 2));
150 Set<Object> keys = cache.asMap().keySet();
159 Set<Object> keys = cache.asMap().keySet();
175 Set<Object> keys = cache.asMap().keySet();
194 Collection<Object> values = cache.asMap().values();
208 cache.asMap().values().add(1);
215 cache.asMap().values().addAll(asList(1, 2));
227 Collection<Object> values = cache.asMap()
[all...]
/external/guava/guava-tests/test/com/google/common/collect/
H A DImmutableMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for an {@link ImmutableMultimap} with
40 return ImmutableMultimap.<String, Integer>of().asMap();
46 return ImmutableMultimap.copyOf(delegate).asMap();
H A DImmutableSetMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for an {@link ImmutableSetMultimap} with
40 return ImmutableSetMultimap.<String, Integer>of().asMap();
46 return ImmutableSetMultimap.copyOf(delegate).asMap();
H A DUnmodifiableMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for an unmodifiable multimap with
41 LinkedHashMultimap.<String, Integer>create()).asMap();
47 return Multimaps.unmodifiableMultimap(delegate).asMap();
H A DConstrainedMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for a constrained multimap with
43 .asMap();
51 .asMap();
H A DMultimapsTransformValuesAsMapTest.java26 * Tests for Multimaps.transformValues().asMap().
41 Functions.<Integer> identity()).asMap();
48 .transformValues(delegate, Functions.<Integer> identity()).asMap();
H A DForMapMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for a {@link Multimaps#forMap} multimap with
41 return Multimaps.forMap(map).asMap();
49 return Multimaps.forMap(map).asMap();
H A DMultimapsFilterEntriesAsMapTest.java27 * Tests for Multimaps.filterEntries().asMap().
55 return multimap.asMap();
61 return multimap.asMap();
/external/guava/guava/src/com/google/common/collect/
H A DAbstractSortedKeySortedSetMultimap.java42 public SortedMap<K, Collection<V>> asMap() { method in class:AbstractSortedKeySortedSetMultimap
43 return (SortedMap<K, Collection<V>>) super.asMap();
H A DAbstractMultimap.java46 for (Collection<V> collection : asMap().values()) {
57 Collection<V> collection = asMap().get(key);
63 Collection<V> collection = asMap().get(key);
154 return new Maps.KeySet<K, Collection<V>>(asMap());
203 private transient Map<K, Collection<V>> asMap; field in class:AbstractMultimap
206 public Map<K, Collection<V>> asMap() { method in class:AbstractMultimap
207 Map<K, Collection<V>> result = asMap;
208 return (result == null) ? asMap = createAsMap() : result;
223 * as returned by {@link Multimap#asMap}.
228 return asMap()
[all...]
H A DAbstractListMultimap.java109 @Override public Map<K, Collection<V>> asMap() { method in class:AbstractListMultimap
110 return super.asMap();
H A DAbstractSetMultimap.java108 @Override public Map<K, Collection<V>> asMap() { method in class:AbstractSetMultimap
109 return super.asMap();
H A DAbstractSortedSetMultimap.java115 * asMap().get(Object)} has the same behavior as {@link #get}, returning a
117 * asMap().get(Object)} returns {@code null} instead of an empty collection.
122 @Override public Map<K, Collection<V>> asMap() { method in class:AbstractSortedSetMultimap
123 return super.asMap();
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
H A DSortedSetMultimapAsMapTester.java29 * Testers for {@link SortedSetMultimap#asMap}.
39 for (Collection<V> valueCollection : multimap().asMap().values()) {
47 SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
57 SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().remove(key);
H A DListMultimapAsMapTester.java38 * Testers for {@link com.google.common.collect.ListMultimap#asMap}.
47 for (Collection<V> valueCollection : multimap().asMap().values()) {
54 assertTrue(multimap().asMap().get(key) instanceof List);
63 assertTrue(multimap().asMap().remove(key) instanceof List);
77 .addEqualityGroup(expected, multimap().asMap())
95 .addEqualityGroup(expected, multimap().asMap().entrySet())
106 assertTrue(multimap().asMap().values().remove(Collections.singletonList(sampleValues().e0)));
111 multimap().asMap());
H A DSetMultimapAsMapTester.java38 * Testers for {@link SetMultimap#asMap}.
47 for (Collection<V> valueCollection : multimap().asMap().values()) {
54 assertTrue(multimap().asMap().get(key) instanceof Set);
63 assertTrue(multimap().asMap().remove(key) instanceof Set);
77 .addEqualityGroup(expected, multimap().asMap())
95 .addEqualityGroup(expected, multimap().asMap().entrySet())
106 assertTrue(multimap().asMap().values().remove(Collections.singleton(sampleValues().e0)));
111 multimap().asMap());
H A DMultimapClearTester.java53 ASSERT.that(multimap().asMap()).isEmpty();
76 multimap().asMap().clear();
114 Collection<V> collection = multimap().asMap().get(key);
124 Map<K, Collection<V>> asMap = multimap().asMap();
126 ASSERT.that(asMap).isEmpty();
H A DMultimapAsMapGetTester.java36 * Tests for {@code Multimap.asMap().get(Object)}.
50 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
59 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
67 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
76 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
84 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
91 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
101 Collection<V> result = multimap().asMap().get(sampleKeys().e0);
115 Collection<V> result = multimap().asMap().get(k0);
139 Collection<V> result = multimap().asMap()
[all...]
H A DMultimapAsMapTester.java42 * Tests for {@link Multimap#asMap}.
57 Collection<V> collection = multimap().asMap().get(key);
70 ASSERT.that(multimap().asMap().get(null)).has().exactly(getValueForNullKey());
75 ASSERT.that(multimap().asMap().get(null)).isNull();
81 multimap().asMap().get(null);
89 ASSERT.that(multimap().asMap().remove(sampleKeys().e0)).iteratesAs(sampleValues().e0);
101 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet();
117 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet();
128 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet();
142 Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap()
[all...]
H A DAbstractListMultimapTester.java42 ASSERT.that(multimap().asMap().get(key)).has().exactlyAs(values).inOrder();
45 ASSERT.that(multimap().asMap().get(key)).isNull();
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
H A DTreeMultimapNaturalTest.java84 multimap.asMap().entrySet().iterator();
190 SortedMap<String, Collection<Integer>> asMap = multimap.asMap();
191 assertEquals(Ordering.natural(), asMap.comparator());
192 assertEquals("foo", asMap.firstKey());
193 assertEquals("tree", asMap.lastKey());
198 asMap.tailMap("g"));
200 asMap.headMap("h"));
202 asMap.subMap("g", "h"));

Completed in 700 milliseconds

12345