public void accept(AbstractReporter r){
  r.testStart(this);
  r.browserInfoEntry(browserInfoEntry);
  Iterator<LogEntry> entryIterator=logEntries.iterator();
  while (entryIterator.hasNext()) {
    LogEntry entry=entryIterator.next();
    if (!entryIterator.hasNext()) {
      entry.setLast(true);
    }
    visit(entry,r);
  }
  r.testEnd(this);
}

public void accept ( AbstractReporter r ) { r . testStart ( this ) ; r . browserInfoEntry ( browserInfoEntry ) ; Iterator < LogEntry > entryIterator = logEntries . iterator ( ) ; while ( entryIterator . hasNext ( ) ) { LogEntry entry = entryIterator . next ( ) ; if ( ! entryIterator . hasNext ( ) ) { entry . setLast ( true ) ; } visit ( entry , r ) ; } r . testEnd ( this ) ; }
implementation of visitor pattern . takes the report for a guided tour through all information stored in the testinfo instance , from start of the test to all entries to test end . it is up to a particular implementation of the reporter to react to different types of test info and log entries . < br > also , detects the last log entry on the fly .
