GetIndex returns the bit at index i within the bit array. The behavior is undefined if i >= bA.Bits
(i int)
| 47 | // GetIndex returns the bit at index i within the bit array. |
| 48 | // The behavior is undefined if i >= bA.Bits |
| 49 | func (bA *BitArray) GetIndex(i int) bool { |
| 50 | if bA == nil { |
| 51 | return false |
| 52 | } |
| 53 | bA.mtx.Lock() |
| 54 | defer bA.mtx.Unlock() |
| 55 | return bA.getIndex(i) |
| 56 | } |
| 57 | |
| 58 | func (bA *BitArray) getIndex(i int) bool { |
| 59 | if i >= bA.Bits { |