Code example for AbstractMap.SimpleImmutableEntry

Methods: getKey

0
        } 
         
    } 
     
    public void test_SimpleImmutableEntry_getKey() throws Exception { 
        Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1,"test");
        assertEquals(1,entry.getKey());
        entry = new AbstractMap.SimpleImmutableEntry(null,null);
        assertNull(entry.getKey());
    } 
     
    public void test_SimpleImmutableEntry_getValue() throws Exception { 
        Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1,"test");
        assertEquals("test",entry.getValue());
        entry = new AbstractMap.SimpleImmutableEntry(null,null);
        assertNull(entry.getValue());
    } 
     
    public void test_SimpleImmutableEntry_setValue() throws Exception { 
        Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1,"test");
        assertEquals("test",entry.getValue());