Package java.util

Examples of java.util.BitSet.intersects()


    // While there are still combinations to examine
    while (fragmentRunAsyncLists.size() < pairCount && !subsetsDescending.isEmpty()) {
      BitSet largestSubset = subsetsDescending.poll().subset;

      // If one of the runAsyncs in the current set of runAsyncs has already been used.
      if (largestSubset.intersects(mergedSubset)) {
        // Then throw this set out.
        continue;
      }

      logger.log(TreeLogger.Type.DEBUG, "Merging " + largestSubset);
View Full Code Here


        bs.set(192);
        bs.set(450);

        BitSet bs2 = new BitSet(8);
        assertFalse("Test1: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test1: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.set(4);
        assertFalse("Test2: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test2: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertFalse("Test1: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test1: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.set(4);
        assertFalse("Test2: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test2: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(5);
        assertTrue("Test3: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test3: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertFalse("Test2: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(5);
        assertTrue("Test3: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test3: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(63);
        assertTrue("Test4: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test4: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test3: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(63);
        assertTrue("Test4: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test4: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(80);
        assertTrue("Test5: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test5: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test4: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(80);
        assertTrue("Test5: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test5: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(127);
        assertTrue("Test6: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test6: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test5: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(127);
        assertTrue("Test6: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test6: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(192);
        assertTrue("Test7: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test7: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test6: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(192);
        assertTrue("Test7: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test7: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(450);
        assertTrue("Test8: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test8: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test7: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(450);
        assertTrue("Test8: intersects() returned incorrect value", bs.intersects(bs2));
        assertTrue("Test8: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(500);
        assertFalse("Test9: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test9: intersects() returned incorrect value", bs2.intersects(bs));
View Full Code Here

        assertTrue("Test8: intersects() returned incorrect value", bs2.intersects(bs));

        bs2.clear();
        bs2.set(500);
        assertFalse("Test9: intersects() returned incorrect value", bs.intersects(bs2));
        assertFalse("Test9: intersects() returned incorrect value", bs2.intersects(bs));
    }

    @Test
    public void and() {
        // Test for method void java.util.BitSet.and(java.util.BitSet)
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.