Package org.apache.commons.collections

Examples of org.apache.commons.collections.BoundedCollection.maxSize()


    //-----------------------------------------------------------------------
    public void testMaxSize() {
        final Buffer bounded = BoundedBuffer.decorate(new UnboundedFifoBuffer(), 2, 500);
        BoundedCollection bc = (BoundedCollection) bounded;
        assertEquals(2, bc.maxSize());
        assertEquals(false, bc.isFull());
        bounded.add("A");
        assertEquals(false, bc.isFull());
        bounded.add("B");
        assertEquals(true, bc.isFull());
View Full Code Here


    //-----------------------------------------------------------------------
    public void testMaxSize() {
        final Buffer bounded = BoundedBuffer.decorate(new UnboundedFifoBuffer(), 2, 500);
        BoundedCollection bc = (BoundedCollection) bounded;
        assertEquals(2, bc.maxSize());
        assertEquals(false, bc.isFull());
        bounded.add("A");
        assertEquals(false, bc.isFull());
        bounded.add("B");
        assertEquals(true, bc.isFull());
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.