private void addBlockListeners(Tracker tracker){
  List<OBlock> range=tracker.getRange();
  if (log.isDebugEnabled()) {
    log.debug("addBlockListeners for tracker= \"" + tracker.getTrainName() + "\" has range of "+ range.size()+ " blocks.");
  }
  Iterator<OBlock> iter=range.iterator();
  while (iter.hasNext()) {
    addBlockListener(iter.next(),tracker);
  }
}

private void addBlockListeners ( Tracker tracker ) { List < OBlock > range = tracker . getRange ( ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "addBlockListeners for tracker= \"" + tracker . getTrainName ( ) + "\" has range of " + range . size ( ) + " blocks." ) ; } Iterator < OBlock > iter = range . iterator ( ) ; while ( iter . hasNext ( ) ) { addBlockListener ( iter . next ( ) , tracker ) ; } }
adds listeners to all blocks in the range of a tracker . called when a new tracker is created .
