Code example for AbstractMap.SimpleEntry

Methods: getValue

0
        entry = new AbstractMap.SimpleEntry(null,null);
        assertNull(entry.getKey());
    } 
     
    public void test_SimpleEntry_getValue() throws Exception { 
        Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1,"test");
        assertEquals("test",entry.getValue());
        entry = new AbstractMap.SimpleEntry(null,null);
        assertNull(entry.getValue());
    } 
     
    public void test_SimpleEntry_setValue() throws Exception { 
        Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1,"test");
        assertEquals("test",entry.getValue());
        entry.setValue("Another String");
        assertEquals("Another String",entry.getValue());
        entry = new AbstractMap.SimpleEntry(null,null);
        assertNull(entry.getKey());
    } 
     
    public void test_SimpleEntry_equals() throws Exception {