Package org.apache.commons.collections.primitives

Examples of org.apache.commons.collections.primitives.ByteList


    protected ByteIterator makeByteIterator() {
        return makeByteListIterator();
    }
   
    protected ByteListIterator makeByteListIterator() {
        ByteList list = new ArrayByteList();
        for(byte i=0;i<10;i++) {
            list.add(i);
        }
        return list.listIterator();
    }
View Full Code Here


    // framework
    // ------------------------------------------------------------------------
    protected abstract ByteIterator makeUnmodifiableByteIterator();

    protected ByteIterator makeByteIterator() {
        ByteList list = new ArrayByteList();
        for(byte i=0;i<10;i++) {
            list.add(i);
        }
        return list.iterator();
    }
View Full Code Here

    public void testWrapNull() {
        assertNull(UnmodifiableByteList.wrap(null));
    }

    public void testWrapUnmodifiableByteList() {
        ByteList list = makeUnmodifiableByteList();
        assertSame(list,UnmodifiableByteList.wrap(list));
    }
View Full Code Here

        ByteList list = makeUnmodifiableByteList();
        assertSame(list,UnmodifiableByteList.wrap(list));
    }

    public void testWrapSerializableByteList() {
        ByteList list = makeByteList();
        assertTrue(list instanceof Serializable);
        assertTrue(UnmodifiableByteList.wrap(list) instanceof Serializable);
    }
View Full Code Here

        assertTrue(list instanceof Serializable);
        assertTrue(UnmodifiableByteList.wrap(list) instanceof Serializable);
    }

    public void testWrapNonSerializableByteList() {
        ByteList list = makeByteList();
        ByteList ns = list.subList(0,list.size());
        assertTrue(!(ns instanceof Serializable));
        assertTrue(!(UnmodifiableByteList.wrap(ns) instanceof Serializable));
    }
View Full Code Here

    protected ByteList makeEmptyByteList() {
        return new ArrayByteList();
    }
   
    protected ByteList makeFullByteList() {
        ByteList list = makeEmptyByteList();
        byte[] elts = getFullElements();
        for(int i=0;i<elts.length;i++) {
            list.add((byte)elts[i]);
        }
        return list;
    }
View Full Code Here

    // collections testing framework
    // ------------------------------------------------------------------------

    protected Object makeObject() {
        ByteList list = new ArrayByteList();
        for(int i=0;i<10;i++) {
            list.add((byte)i);
        }
        return new ByteCollectionCollection(list);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.primitives.ByteList

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.