Package org.jgroups.util

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


    public static void testClearMultiple3() {
        FixedSizeBitSet set=new FixedSizeBitSet(1000);
        set.set(0, 999);
        assert set.cardinality() == 1000;
        set.clear(100, 900);
        assert set.cardinality() == 199;
    }


    public static void testClearMultiple4() {
View Full Code Here


    public static void testClearMultiple4() {
        FixedSizeBitSet set=new FixedSizeBitSet(1000);
        set.set(0, 999);
        assert set.cardinality() == 1000;
        set.clear(300, 999);
        assert set.cardinality() == 300;
    }


    public static void testClearMultiple5() {
View Full Code Here

    public static void testClearMultiple5() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 0);
        assert set.cardinality() == 1;
        set.clear(0);
        assert set.cardinality() == 0;
        set.set(0, 0);
        assert set.cardinality() == 1;
        set.clear(0,0);
        assert set.cardinality() == 0;
View Full Code Here

        assert set.cardinality() == 1;
        set.clear(0);
        assert set.cardinality() == 0;
        set.set(0, 0);
        assert set.cardinality() == 1;
        set.clear(0,0);
        assert set.cardinality() == 0;
    }


    @Test(expectedExceptions=IndexOutOfBoundsException.class)
View Full Code Here


    @Test(expectedExceptions=IndexOutOfBoundsException.class)
    public static void testClearWithIndexOutOfBounds() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.clear(10);
    }

    @Test(expectedExceptions=IndexOutOfBoundsException.class)
    public static void testGetWithIndexOutOfBounds() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
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.