Code example for IdentityHashMap

Methods: containsKeyput

        assertTrue("Returned true for copy of valid key", !hm
                .containsKey(new Integer(23).toString()));
        assertTrue("Returned true for invalid key", !hm.containsKey("KKDKDKD"));
        IdentityHashMap m = new IdentityHashMap();
        m.put(null, "test");
        assertTrue("Failed with null key", m.containsKey(null));
        assertTrue("Failed with missing key matching null hash", !m
                .containsKey(new Integer(0)));
     * java.util.IdentityHashMap#containsValue(java.lang.Object) 
    public void test_containsValueLjava_lang_Object() { 
        // Test for method boolean 
        // java.util.IdentityHashMap.containsValue(java.lang.Object) 
        assertTrue("Returned false for valid value", hm
        assertTrue("Returned true for invalid valie", !hm