Search in sources :

Example 11 with PeekableIntIterator

use of org.roaringbitmap.PeekableIntIterator in project RoaringBitmap by RoaringBitmap.

the class TestIterators method testIndexIterator4.

@Test
public void testIndexIterator4() throws Exception {
    MutableRoaringBitmap b = new MutableRoaringBitmap();
    for (int i = 0; i < 4096; i++) {
        b.add(i);
    }
    PeekableIntIterator it = b.getIntIterator();
    it.advanceIfNeeded(4096);
    while (it.hasNext()) {
        it.next();
    }
}
Also used : PeekableIntIterator(org.roaringbitmap.PeekableIntIterator) Test(org.junit.Test)

Aggregations

PeekableIntIterator (org.roaringbitmap.PeekableIntIterator)11 Test (org.junit.Test)8 Random (java.util.Random)3 TODO (jcog.TODO)1 Util (jcog.Util)1 FasterList (jcog.list.FasterList)1 Term (nars.term.Term)1 PrediTerm (nars.term.pred.PrediTerm)1 IntIntPair (org.eclipse.collections.api.tuple.primitive.IntIntPair)1 NotNull (org.jetbrains.annotations.NotNull)1 RoaringBitmap (org.roaringbitmap.RoaringBitmap)1