test_class.file: core/src/test/java/dk/alexandra/fresco/framework/util/TestBitSetUtils.java
test_class.identifier: TestBitSetUtils
test_case.body: @Test
    public void testToList() {
      int[] indices = new int[] { 0, 1, 4, 10, 6, 9, 11 };
      BitSet bitSet = new BitSet(20);
      for (int i: indices) {
        bitSet.set(i);
      }
      List<Boolean> list = BitSetUtils.toList(bitSet, bitSet.size());
      Assert.assertEquals(bitSet.size(), list.size());
      for (int i = 0; i < bitSet.size(); i++) {
        Assert.assertEquals(bitSet.get(i), list.get(i));
      }
      List<Boolean> shortList = BitSetUtils.toList(bitSet, 5);
      Assert.assertEquals(5, shortList.size());
      for (int i = 0; i < 5; i++) {
        Assert.assertEquals(bitSet.get(i), shortList.get(i));
      }
      List<Boolean> longList = BitSetUtils.toList(bitSet, bitSet.size() + 10);
      Assert.assertEquals(bitSet.size() + 10, longList.size());
      for (int i = 0; i < bitSet.size() + 10; i++) {
        Assert.assertEquals(bitSet.get(i), longList.get(i));
      }
      boolean exception = false;
      try {
        BitSetUtils.toList(bitSet, -2);
      } catch (IllegalArgumentException e) {
        exception = true;
      }
      Assert.assertTrue(exception);
    }
test_case.class_method_signature: TestBitSetUtils.testToList()
test_case.full_signature: @Test public void testToList()
test_case.identifier: testToList
test_case.invocations: set toList size assertEquals size size size assertEquals get get toList assertEquals size assertEquals get get toList size assertEquals size size size assertEquals get get toList assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToList()
focal_class.file: core/src/main/java/dk/alexandra/fresco/framework/util/BitSetUtils.java
focal_class.identifier: BitSetUtils
focal_class.class_method_signature: BitSetUtils.BitSetUtils()
focal_class.full_signature: private  BitSetUtils()
focal_class.identifier: BitSetUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  BitSetUtils()
focal_class.class_method_signature: BitSetUtils.copy(BitSet b)
focal_class.full_signature: public static BitSet copy(BitSet b)
focal_class.identifier: copy
focal_class.modifiers: public static
focal_class.parameters: (BitSet b)
focal_class.return: BitSet
focal_class.signature: BitSet copy(BitSet b)
focal_class.class_method_signature: BitSetUtils.getRandomBits(int n, Random random)
focal_class.full_signature: public static BitSet getRandomBits(int n, Random random)
focal_class.identifier: getRandomBits
focal_class.modifiers: public static
focal_class.parameters: (int n, Random random)
focal_class.return: BitSet
focal_class.signature: BitSet getRandomBits(int n, Random random)
focal_class.class_method_signature: BitSetUtils.toString(BitSet bits, int n)
focal_class.full_signature: public static String toString(BitSet bits, int n)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (BitSet bits, int n)
focal_class.return: String
focal_class.signature: String toString(BitSet bits, int n)
focal_class.class_method_signature: BitSetUtils.toString(BitSet bits)
focal_class.full_signature: public static String toString(BitSet bits)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (BitSet bits)
focal_class.return: String
focal_class.signature: String toString(BitSet bits)
focal_class.class_method_signature: BitSetUtils.innerProduct(BitSet a, BitSet b)
focal_class.full_signature: public static boolean innerProduct(BitSet a, BitSet b)
focal_class.identifier: innerProduct
focal_class.modifiers: public static
focal_class.parameters: (BitSet a, BitSet b)
focal_class.return: boolean
focal_class.signature: boolean innerProduct(BitSet a, BitSet b)
focal_class.class_method_signature: BitSetUtils.isOdd(int n)
focal_class.full_signature: private static boolean isOdd(int n)
focal_class.identifier: isOdd
focal_class.modifiers: private static
focal_class.parameters: (int n)
focal_class.return: boolean
focal_class.signature: boolean isOdd(int n)
focal_class.class_method_signature: BitSetUtils.fromList(List<Boolean> list)
focal_class.full_signature: public static BitSet fromList(List<Boolean> list)
focal_class.identifier: fromList
focal_class.modifiers: public static
focal_class.parameters: (List<Boolean> list)
focal_class.return: BitSet
focal_class.signature: BitSet fromList(List<Boolean> list)
focal_class.class_method_signature: BitSetUtils.fromArray(boolean[] array)
focal_class.full_signature: public static BitSet fromArray(boolean[] array)
focal_class.identifier: fromArray
focal_class.modifiers: public static
focal_class.parameters: (boolean[] array)
focal_class.return: BitSet
focal_class.signature: BitSet fromArray(boolean[] array)
focal_class.class_method_signature: BitSetUtils.toArray(BitSet bitset, int length)
focal_class.full_signature: public static boolean[] toArray(BitSet bitset, int length)
focal_class.identifier: toArray
focal_class.modifiers: public static
focal_class.parameters: (BitSet bitset, int length)
focal_class.return: boolean[]
focal_class.signature: boolean[] toArray(BitSet bitset, int length)
focal_class.class_method_signature: BitSetUtils.toList(BitSet bitset, int n)
focal_class.full_signature: public static List<Boolean> toList(BitSet bitset, int n)
focal_class.identifier: toList
focal_class.modifiers: public static
focal_class.parameters: (BitSet bitset, int n)
focal_class.return: List<Boolean>
focal_class.signature: List<Boolean> toList(BitSet bitset, int n)
focal_method.body: public static List<Boolean> toList(BitSet bitset, int n) {
      if (n < 0) {
        throw new IllegalArgumentException("Size of list must not be negative but was + " + n);
      }
      List<Boolean> list = new ArrayList<>(n);
      for (int i = 0; i < n; i++) {
        list.add(bitset.get(i));
      }
      return list;
    }
focal_method.class_method_signature: BitSetUtils.toList(BitSet bitset, int n)
focal_method.full_signature: public static List<Boolean> toList(BitSet bitset, int n)
focal_method.identifier: toList
focal_method.invocations: add get
focal_method.modifiers: public static
focal_method.parameters: (BitSet bitset, int n)
focal_method.return: List<Boolean>
focal_method.signature: List<Boolean> toList(BitSet bitset, int n)