@Test public void testSizeOfEmptyBitSet() { BitSet set = new BitSet(10); assertEquals(0, set.size()); }
public int size() { int count = 0; for(long packet : packets) { count += Long.bitCount(packet); } return count; }
BitSet { public int size() { int count = 0; for(long packet : packets) { count += Long.bitCount(packet); } return count; } }
BitSet { public int size() { int count = 0; for(long packet : packets) { count += Long.bitCount(packet); } return count; } BitSet(int maxElements);  BitSet(long[] packets);  BitSet(BitSet set); }
BitSet { public int size() { int count = 0; for(long packet : packets) { count += Long.bitCount(packet); } return count; } BitSet(int maxElements);  BitSet(long[] packets);  BitSet(BitSet set); long[] getPackets(); BitSet copy(); void add(int bitIndex); boolean contains(int bitIndex); void union(BitSet other); boolean isEmpty(); boolean isSuperset(BitSet other); IntSinglyLinkedList toList(); int size(); @Override boolean equals(Object obj); @Override int hashCode(); static BitSet union(BitSet set1, BitSet set2); }
BitSet { public int size() { int count = 0; for(long packet : packets) { count += Long.bitCount(packet); } return count; } BitSet(int maxElements);  BitSet(long[] packets);  BitSet(BitSet set); long[] getPackets(); BitSet copy(); void add(int bitIndex); boolean contains(int bitIndex); void union(BitSet other); boolean isEmpty(); boolean isSuperset(BitSet other); IntSinglyLinkedList toList(); int size(); @Override boolean equals(Object obj); @Override int hashCode(); static BitSet union(BitSet set1, BitSet set2);  }