Package org.apache.commons.collections15

Examples of org.apache.commons.collections15.OrderedMap


        buffer.addAll(Arrays.asList(getFullElements()));
        return UnmodifiableBuffer.decorate(buffer);
    }

    public Collection makeConfirmedCollection() {
        ArrayStack list = new ArrayStack();
        return list;
    }
View Full Code Here


        ArrayStack list = new ArrayStack();
        return list;
    }

    public Collection makeConfirmedFullCollection() {
        ArrayStack list = new ArrayStack();
        list.addAll(Arrays.asList(getFullElements()));
        return list;
    }
View Full Code Here

        buffer.addAll(Arrays.asList(getFullElements()));
        return SynchronizedBuffer.decorate(buffer);
    }

    public Collection makeConfirmedCollection() {
        ArrayStack list = new ArrayStack();
        return list;
    }
View Full Code Here

        ArrayStack list = new ArrayStack();
        return list;
    }

    public Collection makeConfirmedFullCollection() {
        ArrayStack list = new ArrayStack();
        list.addAll(Arrays.asList(getFullElements()));
        return list;
    }
View Full Code Here

    protected Buffer decorateBuffer(Buffer buffer, Predicate predicate) {
        return PredicatedBuffer.decorate(buffer, predicate);
    }

    public Collection makeCollection() {
        return decorateBuffer(new ArrayStack(), truePredicate);
    }
View Full Code Here

    public Collection makeCollection() {
        return decorateBuffer(new ArrayStack(), truePredicate);
    }

    public Collection makeConfirmedCollection() {
        return new ArrayStack();
    }
View Full Code Here

    public Collection makeConfirmedCollection() {
        return new ArrayStack();
    }

    public Collection makeConfirmedFullCollection() {
        ArrayStack list = new ArrayStack();
        list.addAll(java.util.Arrays.asList(getFullElements()));
        return list;
    }
View Full Code Here

    }
   
    //------------------------------------------------------------
   
    public Buffer makeTestBuffer() {
        return decorateBuffer(new ArrayStack(), testPredicate);
    }
View Full Code Here

    }
   
    //--------------------------------------------------------------------------

    public void testlegalAddRemove() {
        Bag bag = makeTestBag();
        assertEquals(0, bag.size());
        Object[] els = new Object[]{"1", "3", "5", "7", "2", "4", "1"};
        for (int i = 0; i < els.length; i++) {
            bag.add(els[i]);
            assertEquals(i + 1, bag.size());
            assertEquals(true, bag.contains(els[i]));
        }
        Set set = ((PredicatedBag) bag).uniqueSet();
        assertTrue("Unique set contains the first element", set.contains(els[0]));
        assertEquals(true, bag.remove(els[0]));
        set = ((PredicatedBag) bag).uniqueSet();
        assertTrue("Unique set now does not contain the first element", !set.contains(els[0]));
    }
View Full Code Here

        set = ((PredicatedBag) bag).uniqueSet();
        assertTrue("Unique set now does not contain the first element", !set.contains(els[0]));
    }

    public void testIllegalAdd() {
        Bag bag = makeTestBag();
        Integer i = new Integer(3);
        try {
            bag.add(i);
            fail("Integer should fail type check.");
        } catch (IllegalArgumentException e) {
            // expected
        }
        assertTrue("Collection shouldn't contain illegal element", !bag.contains(i));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections15.OrderedMap

Copyright © 2018 www.massapicom. 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.