public boolean isPageInRange(int pageNumber){
  for (int ind=0; ind < sequenceStarts.size(); ind++) {
    if (sequenceStarts.get(ind) <= pageNumber && pageNumber <= sequenceEnds.get(ind))     return true;
  }
  return false;
}

public boolean isPageInRange ( int pageNumber ) { for ( int ind = 0 ; ind < sequenceStarts . size ( ) ; ind ++ ) { if ( sequenceStarts . get ( ind ) <= pageNumber && pageNumber <= sequenceEnds . get ( ind ) ) return true ; } return false ; }
checks if a given page is present in the range built so far .
