Code example for IdentityHashMap

Methods: getput

		hm.put("T", "HELLO");
		assertEquals("Get returned incorecct value for existing key", "HELLO", hm.get("T")
		IdentityHashMap m = new IdentityHashMap();
		m.put(null, "test");
		assertEquals("Failed with null key", "test", m.get(null));
		assertNull("Failed with missing key matching null hash", m
				.get(new Integer(0)));
	 * @tests java.util.IdentityHashMap#isEmpty() 
	public void test_isEmpty() { 
		// Test for method boolean java.util.IdentityHashMap.isEmpty() 
		assertTrue("Returned false for new map", new IdentityHashMap()
		assertTrue("Returned true for non-empty", !hm.isEmpty());
Connect your IDE to all the code out there  Get Codota for Java