(o container)
| 223 | } |
| 224 | |
| 225 | func (ac *arrayContainer) equals(o container) bool { |
| 226 | srb, ok := o.(*arrayContainer) |
| 227 | if ok { |
| 228 | // Check if the containers are the same object. |
| 229 | if ac == srb { |
| 230 | return true |
| 231 | } |
| 232 | |
| 233 | if len(srb.content) != len(ac.content) { |
| 234 | return false |
| 235 | } |
| 236 | |
| 237 | for i, v := range ac.content { |
| 238 | if v != srb.content[i] { |
| 239 | return false |
| 240 | } |
| 241 | } |
| 242 | return true |
| 243 | } |
| 244 | |
| 245 | // use generic comparison |
| 246 | bCard := o.getCardinality() |
| 247 | aCard := ac.getCardinality() |
| 248 | if bCard != aCard { |
| 249 | return false |
| 250 | } |
| 251 | |
| 252 | ait := ac.getShortIterator() |
| 253 | bit := o.getShortIterator() |
| 254 | for ait.hasNext() { |
| 255 | if bit.next() != ait.next() { |
| 256 | return false |
| 257 | } |
| 258 | } |
| 259 | return true |
| 260 | } |
| 261 | |
| 262 | func (ac *arrayContainer) toBitmapContainer() *bitmapContainer { |
| 263 | bc := newBitmapContainer() |
nothing calls this directly
no test coverage detected