- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for testPutAndGetInstance (0.08 sec)
-
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() { assertNull(map.putInstance(Integer.class, new Integer(5))); Integer oldValue = map.putInstance(Integer.class, new Integer(7)); assertEquals(5, (int) oldValue);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Feb 11 18:34:30 UTC 2025 - 4.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java
assertEquals(TypeToken.of(String.class), entry.getKey()); assertEquals("test", entry.getValue()); assertThrows(UnsupportedOperationException.class, () -> entry.setValue(1)); } public void testPutAndGetInstance() { assertNull(map.putInstance(Integer.class, Integer.valueOf(5))); Integer oldValue = map.putInstance(Integer.class, Integer.valueOf(7)); assertEquals(5, (int) oldValue);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 8K bytes - Viewed (0)