boolean intersects ( LongBitSet other ) { // Depends on the ghost bits being clear! int pos = Math . min ( numWords , other . numWords ) ; while ( -- pos >= 0 ) { if ( ( bits [ pos ] & other . bits [ pos ] ) != 0 ) return true ; } return false ; }
returns true if the sets have any elements in common