Code example for TreeMap

Methods: headMap, put

0
 
        Set<String> keySet = subMap.keySet();
        iter = keySet.iterator();
        size = 0;
        while (iter.hasNext()) {
            String key = (String) iter.next();
            assertTrue(map.containsKey(key));
            size++;
        } 
        assertEquals(map.size(), size);
    } 
 
 
    /** 
     * @tests java.util.TreeMap#tailMap(java.lang.Object) 
     */ 
    public void test_tailMapLjava_lang_Object() { 
        // Test for method java.util.SortedMap 
        // java.util.TreeMap.tailMap(java.lang.Object) 
        Map tail = tm.tailMap(objArray[900].toString());
        assertTrue("Returned map of incorrect size : " + tail.size(), tail