@Test public void testBitSetEquals() { BitSet set1 = new BitSet(20); set1.add(1); set1.add(5); set1.add(19); BitSet set2 = new BitSet(20); set2.add(19); set2.add(5); set2.add(1); assertEquals(set1, set2); assertEquals(set2, set1); }
public void add(int bitIndex) { packets[getPacketIndex(bitIndex)] |= getBitMask(bitIndex); }
BitSet { public void add(int bitIndex) { packets[getPacketIndex(bitIndex)] |= getBitMask(bitIndex); } }
BitSet { public void add(int bitIndex) { packets[getPacketIndex(bitIndex)] |= getBitMask(bitIndex); } BitSet(int maxElements);  BitSet(long[] packets);  BitSet(BitSet set); }
BitSet { public void add(int bitIndex) { packets[getPacketIndex(bitIndex)] |= getBitMask(bitIndex); } 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 void add(int bitIndex) { packets[getPacketIndex(bitIndex)] |= getBitMask(bitIndex); } 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);  }