- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for testPutIfAbsent (0.19 sec)
-
guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
final ConcurrentMap<String, Integer> delegate = new ConcurrentHashMap<>(); @Override protected ConcurrentMap<String, Integer> delegate() { return delegate; } } public void testPutIfAbsent() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2)); assertEquals(Integer.valueOf(1), map.get("foo")); assertNull(map.putIfAbsent("bar", 3));
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
final ConcurrentMap<String, Integer> delegate = new ConcurrentHashMap<>(); @Override protected ConcurrentMap<String, Integer> delegate() { return delegate; } } public void testPutIfAbsent() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2)); assertEquals(Integer.valueOf(1), map.get("foo")); assertNull(map.putIfAbsent("bar", 3));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0)