Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testReplaceConditional (0.16 sec)

  1. android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java

        assertEquals(Integer.valueOf(1), map.replace("foo", 2));
        assertNull(map.replace("bar", 3));
        assertEquals(Integer.valueOf(2), map.get("foo"));
        assertFalse(map.containsKey("bar"));
      }
    
      public void testReplaceConditional() {
        TestMap map = new TestMap();
        map.put("foo", 1);
        assertFalse(map.replace("foo", 2, 3));
        assertFalse(map.replace("bar", 1, 2));
        assertEquals(Integer.valueOf(1), map.get("foo"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.4K bytes
    - Viewed (0)
Back to top