Code example for HashMap

Methods: putremove

    public void test_removeLjava_lang_Object() { 
        Object key = new Object();
        Object value = new Object();
        AbstractMap map1 = new HashMap(0);
        map1.put("key", value);
        assertSame("HashMap(0)", map1.remove("key"), value);
        AbstractMap map4 = new IdentityHashMap(1);
        map4.put(key, value);
        assertSame("IdentityHashMap", map4.remove(key), value);
        AbstractMap map5 = new LinkedHashMap(122);
        map5.put(key, value);
        assertSame("LinkedHashMap", map5.remove(key), value);
        AbstractMap map6 = new TreeMap(new Comparator() {
            // Bogus comparator 
            public int compare(Object object1, Object object2) {
Connect your IDE to all the code out there  Get Codota for Java