private StackInterval activateNext(){
  if (unhandled.isEmpty()) {
    return null;
  }
  StackInterval next=unhandled.poll();
  for (int id=next.from(); activePeekId() < id; ) {
    finished(active.poll());
  }
  Debug.log("active %s",next);
  active.add(next);
  return next;
}

private StackInterval activateNext ( ) { if ( unhandled . isEmpty ( ) ) { return null ; } StackInterval next = unhandled . poll ( ) ; for ( int id = next . from ( ) ; activePeekId ( ) < id ; ) { finished ( active . poll ( ) ) ; } Debug . log ( "active %s" , next ) ; active . add ( next ) ; return next ; }
gets the next unhandled interval and finishes handled intervals .
