Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testPutAndGetInstance (0.06 sec)

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

         */
        map.put(Integer.class, new Integer(5));
        assertThrows(ClassCastException.class, () -> map.put(Double.class, new Long(42)));
        // Won't compile: map.put(String.class, "x");
      }
    
      public void testPutAndGetInstance() {
        assertThat(map.putInstance(Integer.class, new Integer(5))).isNull();
    
        Integer oldValue = map.putInstance(Integer.class, new Integer(7));
        assertEquals(5, (int) oldValue);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 5K bytes
    - Viewed (0)
Back to top