Description:
Compares this object against the specified object.
The result is true if and only if the argument is not null and is a BitSet object that has exactly the same set of bits set to true as this bit set.
That is, for every nonnegative int index k,
((BitSet)obj).get(k) == this.get(k)
must be true.
The current sizes of the two bit sets are not compared.
Example
BitSet bitset1 = new BitSet();
BitSet bitset2 = new BitSet();
bitset1.set(0);
bitset1.set(1);
bitset1.set(2);
bitset1.set(3);
bitset1.set(4);
Logger.log("Bitset2: " + bitset2);
bitset2 = (BitSet) bitset1.clone();
Logger.log("Bitset2: " + bitset2);
if (bitset2.equals(bitset1))
Logger.log("bitset2 equals bitset1");
The example above clones the bitset1 to the bitset2. Afterwards the equality between bitset1 and bitset2 is verified.