Package org.apache.commons.collections.primitives

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


            if(this == that) {
                return true;
            } else if(this.size() != that.size()) {
                return false;           
            } else {
                FloatIterator thisiter = iterator();
                FloatIterator thatiter = that.iterator();
                while(thisiter.hasNext()) {
                    if(thisiter.next() != thatiter.next()) {
                        return false;
                    }
                }
                return true;
            }
View Full Code Here


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

    public void testWrapUnmodifiableFloatIterator() {
        FloatIterator iter = makeUnmodifiableFloatIterator();
        assertSame(iter,UnmodifiableFloatIterator.wrap(iter));
    }
View Full Code Here

    // tests
    // ------------------------------------------------------------------------

    public final void testFloatIteratorNotModifiable() {
        FloatIterator iter = makeUnmodifiableFloatIterator();
        assertTrue(iter.hasNext());
        iter.next();
        try {
            iter.remove();
            fail("Expected UnsupportedOperationException");
        } catch(UnsupportedOperationException e) {
            // expected
        }
    }
View Full Code Here

            // expected
        }
    }

    public final void testIterateFloatIterator() {       
        FloatIterator iter = makeUnmodifiableFloatIterator();
        for(FloatIterator expected = makeFloatIterator(); expected.hasNext(); ) {
            assertTrue(iter.hasNext());
            assertEquals(expected.next(),iter.next(),(float)0);
        }
        assertTrue(! iter.hasNext() );
    }
View Full Code Here

TOP

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

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.