bit-array icon indicating copy to clipboard operation
bit-array copied to clipboard

.equals() always returning true

Open zacharynevin opened this issue 11 years ago • 1 comments

I am trying to check if two bitarray are equivelant, but I get 'true' no matter what. Let's say I have the following bitarrays:

bitarray_1.toString() =  001001000
bitarray_2.toString() =  101001000

bitarray_1.equals(bitarray_2) // this should return false
-> true

zacharynevin avatar Jun 13 '14 17:06 zacharynevin

I just decided to XOR the bitarrays and check if count() is equal to 0.

zacharynevin avatar Jun 13 '14 18:06 zacharynevin