public boolean hasSpansIntersecting ( int start , int end ) { for ( int i = 0 ; i < numberOfSpans ; i ++ ) { // equal test is valid since both intervals are not empty by construction if ( spanStarts [ i ] >= end || spanEnds [ i ] <= start ) continue ; return true ; } return false ; }
Returns true if there are spans intersecting the given interval .