Package com.sleepycat.bdb.collection

Examples of com.sleepycat.bdb.collection.StoredIterator


                assertTrue(!iter.hasNext());
                try { iter.next(); } catch (NoSuchElementException e) {}
                if (isList) assertEquals(Integer.MAX_VALUE, li.nextIndex());
            }
            // loop thru all and collect in array
            StoredIterator si = (StoredIterator) iter;
            int[] values = new int[endValue - beginValue + 1];
            for (int i = beginValue; i <= endValue; i += 1) {
                assertTrue(iter.hasNext());
                int idx = i - beginKey;
                if (isList) assertEquals(idx, li.nextIndex());
                int value = intIter(coll, iter.next());
                if (isList) assertEquals(idx, li.previousIndex());
                values[i - beginValue] = value;
                if (si.getCollection().isOrdered()) {
                    assertEquals(i, value);
                } else {
                    assertTrue(value >= beginValue);
                    assertTrue(value <= endValue);
                }
View Full Code Here


    void checkDupsSize(int expected, Collection coll) {

        assertEquals(expected, coll.size());
        if (coll instanceof StoredCollection) {
            StoredIterator i = ((StoredCollection) coll).iterator(false);
            try {
                int actual = 0;
                if (i.hasNext()) {
                    i.next();
                    actual = i.count();
                }
                assertEquals(expected, actual);
            } finally {
                StoredIterator.close(i);
            }
View Full Code Here

    }

    private Object doJoin(StoredCollection coll) {

        StoredContainer[] indices = { indexMap1, indexMap2 };
        StoredIterator i = coll.join(indices, VALUES);
        try {
            assertTrue(i.hasNext());
            Object result = i.next();
            assertNotNull(result);
            assertFalse(i.hasNext());
            return result;
        } finally { i.close(); }
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.bdb.collection.StoredIterator

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.