Home | History | Annotate | Download | only in collect

Lines Matching refs:map

28 import java.util.Map;
55 final ConcurrentMap<String, String> map = new MapMaker()
60 // seed the map, so its segment's count > 0
61 map.put("a", "a");
68 map.get("b");
75 map.clear();
78 // don't check map.size() until we know the get("b") call is complete
81 // At this point, the listener should be holding the seed value (a -> a), and the map should
88 assertEquals(1, map.size());
89 assertEquals("b", map.get("b"));
99 * map afterward).
104 // - computation ends first: the removal listener is called, and the map does not contain the
106 // - clear() happens first: the removal listener is not called, and the map contains the pair
111 final Map<String, String> map = new MapMaker()
120 // seed the map, so its segments have a count>0; otherwise, clear() won't visit the in-progress
124 map.put(s, s);
135 map.get(s);
148 map.clear();
154 Map<String, String> removalNotifications = Maps.newHashMap();
167 // Each of the values added to the map should either still be there, or have seen a removal
169 assertEquals(expectedKeys, Sets.union(map.keySet(), removalNotifications.keySet()));
170 assertTrue(Sets.intersection(map.keySet(), removalNotifications.keySet()).isEmpty());