Package org.jgroups.util

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


    }

    @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


    public static void testSet() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        assert set.set(4) && set.cardinality() == 1;
        assert !set.set(4);
        set.clear(4);
        assert set.cardinality() == 0;
        assert set.set(4) && set.cardinality() == 1;
    }

    public static void testSetMultiple() {
View Full Code Here

    public static void testClear() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 9);
        assert set.cardinality() == 10;
        set.clear(0);
        assert set.cardinality() == 9;
        set.clear(9);
        assert set.cardinality() == 8;
        assert !set.get(9);
        set.clear(5); set.clear(6);
View Full Code Here

        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 9);
        assert set.cardinality() == 10;
        set.clear(0);
        assert set.cardinality() == 9;
        set.clear(9);
        assert set.cardinality() == 8;
        assert !set.get(9);
        set.clear(5); set.clear(6);
        System.out.println("set = " + set);
        assert set.cardinality() == 6;
View Full Code Here

        set.clear(0);
        assert set.cardinality() == 9;
        set.clear(9);
        assert set.cardinality() == 8;
        assert !set.get(9);
        set.clear(5); set.clear(6);
        System.out.println("set = " + set);
        assert set.cardinality() == 6;
    }

    public static void testClearMultiple() {
View Full Code Here

        set.clear(0);
        assert set.cardinality() == 9;
        set.clear(9);
        assert set.cardinality() == 8;
        assert !set.get(9);
        set.clear(5); set.clear(6);
        System.out.println("set = " + set);
        assert set.cardinality() == 6;
    }

    public static void testClearMultiple() {
View Full Code Here

    public static void testClearMultiple() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 9);
        assert set.cardinality() == 10;
        set.clear(0, 0);
        assert set.cardinality() == 9;
        set.clear(0,1);
        assert set.cardinality() == 8;
        set.clear(6,9);
        assert set.cardinality() == 4;
View Full Code Here

        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 9);
        assert set.cardinality() == 10;
        set.clear(0, 0);
        assert set.cardinality() == 9;
        set.clear(0,1);
        assert set.cardinality() == 8;
        set.clear(6,9);
        assert set.cardinality() == 4;
    }
View Full Code Here

        assert set.cardinality() == 10;
        set.clear(0, 0);
        assert set.cardinality() == 9;
        set.clear(0,1);
        assert set.cardinality() == 8;
        set.clear(6,9);
        assert set.cardinality() == 4;
    }

    public static void testClearMultiple2() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
View Full Code Here

    }

    public static void testClearMultiple2() {
        FixedSizeBitSet set=new FixedSizeBitSet(10);
        set.set(0, 9);
        set.clear(5,8);
        assert set.cardinality() == 6;
    }

    public static void testClearMultiple3() {
        FixedSizeBitSet set=new FixedSizeBitSet(1000);
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.