Examples of nextClearBit()


Examples of java.util.BitSet.nextClearBit()

                .nextClearBit(32));
        assertEquals("nextClearBit() returned the wrong value", 63, bs
                .nextClearBit(33));

        // boundary tests
        assertEquals("nextClearBit() returned the wrong value", 63, bs
                .nextClearBit(63));
        assertEquals("nextClearBit() returned the wrong value", 64, bs
                .nextClearBit(64));

        // at bitset element 1
View Full Code Here

Examples of java.util.BitSet.nextClearBit()

                .nextClearBit(33));

        // boundary tests
        assertEquals("nextClearBit() returned the wrong value", 63, bs
                .nextClearBit(63));
        assertEquals("nextClearBit() returned the wrong value", 64, bs
                .nextClearBit(64));

        // at bitset element 1
        assertEquals("nextClearBit() returned the wrong value", 71, bs
                .nextClearBit(65));
View Full Code Here

Examples of java.util.BitSet.nextClearBit()

                .nextClearBit(63));
        assertEquals("nextClearBit() returned the wrong value", 64, bs
                .nextClearBit(64));

        // at bitset element 1
        assertEquals("nextClearBit() returned the wrong value", 71, bs
                .nextClearBit(65));
        assertEquals("nextClearBit() returned the wrong value", 71, bs
                .nextClearBit(71));
        assertEquals("nextClearBit() returned the wrong value", 72, bs
                .nextClearBit(72));
View Full Code Here

Examples of java.util.BitSet.nextClearBit()

                .nextClearBit(64));

        // at bitset element 1
        assertEquals("nextClearBit() returned the wrong value", 71, bs
                .nextClearBit(65));
        assertEquals("nextClearBit() returned the wrong value", 71, bs
                .nextClearBit(71));
        assertEquals("nextClearBit() returned the wrong value", 72, bs
                .nextClearBit(72));
        assertEquals("nextClearBit() returned the wrong value", 127, bs
                .nextClearBit(110));
View Full Code Here

Examples of org.h2.util.BitField.nextClearBit()

    private void testNextClearBit() {
        BitSet set = new BitSet();
        BitField field = new BitField();
        set.set(0, 640);
        field.set(0, 640, true);
        assertEquals(set.nextClearBit(0), field.nextClearBit(0));

        Random random = new Random(1);
        field = new BitField();
        field.set(0, 500, true);
        for (int i = 0; i < 100000; i++) {
View Full Code Here

Examples of org.h2.util.BitField.nextClearBit()

        for (int i = 0; i < 100000; i++) {
            int a = random.nextInt(120);
            int b = a + 1 + random.nextInt(200);
            field.clear(a);
            field.clear(b);
            assertEquals(b, field.nextClearBit(a + 1));
            field.set(a);
            field.set(b);
        }
    }
View Full Code Here

Examples of org.h2.util.BitField.nextClearBit()

                    bits.clear(idx);
                    set.clear(idx);
                }
            } else {
                assertEquals(set.get(idx), bits.get(idx));
                assertEquals(set.nextClearBit(idx), bits.nextClearBit(idx));
                assertEquals(set.length(), bits.length());
            }
        }
    }
View Full Code Here

Examples of org.h2.util.BitField.nextClearBit()

            if (!bits.get(i)) {
                fail("not set: " + i);
            }
        }
        for (int i = 0; i < 1000; i++) {
            int k = bits.nextClearBit(0);
            if (k != 10000) {
                fail("" + k);
            }
        }
    }
View Full Code Here

Examples of org.jgroups.util.FixedSizeBitSet.nextClearBit()



    public static void testNextClearBit() {
        FixedSizeBitSet set=new FixedSizeBitSet(64);
        int index=set.nextClearBit(0);
        assert index == 0 : "expected 0 but got " + index;

        set.set(62); set.set(63);
        index=set.nextClearBit(62);
        assert index == -1;
View Full Code Here

Examples of org.jgroups.util.FixedSizeBitSet.nextClearBit()

        FixedSizeBitSet set=new FixedSizeBitSet(64);
        int index=set.nextClearBit(0);
        assert index == 0 : "expected 0 but got " + index;

        set.set(62); set.set(63);
        index=set.nextClearBit(62);
        assert index == -1;
    }


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.