Examples of MapIterator


Examples of org.apache.commons.collections.MapIterator

    //-----------------------------------------------------------------------
    public void testMapIteratorRemoveGetKey() {
        if (supportsRemove() == false) {
            return;
        }
        MapIterator it = makeFullMapIterator();
        Map map = getMap();
        Map confirmed = getConfirmedMap();
       
        assertEquals(true, it.hasNext());
        Object key = it.next();
       
        it.remove();
        confirmed.remove(key);
        verify();
       
        try {
            it.getKey();
            fail();
        } catch (IllegalStateException ex) {}
        verify();
    }
View Full Code Here

Examples of org.apache.commons.collections15.MapIterator

    public void testMapIterator() {
        assertTrue(makeEmptyMapIterator() instanceof Unmodifiable);
    }

    public void testDecorateFactory() {
        MapIterator it = makeFullMapIterator();
        assertSame(it, UnmodifiableMapIterator.decorate(it));

        it = ((BidiMap) getMap()).mapIterator();
        assertTrue(it != UnmodifiableMapIterator.decorate(it));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.