@Override public String generateElement(){
  if (adsIdx == ads.size()) {
    adsIdx=0;
  }
  if (eventsIdx == eventTypes.length) {
    eventsIdx=0;
  }
  sb.setLength(0);
  sb.append("{\"user_id\":\"");
  sb.append(pageID);
  sb.append("\",\"page_id\":\"");
  sb.append(userID);
  sb.append("\",\"ad_id\":\"");
  sb.append(ads.get(adsIdx++));
  sb.append("\",\"ad_type\":\"");
  sb.append("banner78");
  sb.append("\",\"event_type\":\"");
  sb.append(eventTypes[eventsIdx++]);
  sb.append("\",\"event_time\":\"");
  sb.append(System.currentTimeMillis());
  sb.append("\",\"ip_address\":\"1.2.3.4\"}");
  return sb.toString();
}

@ Override public String generateElement ( ) { if ( adsIdx == ads . size ( ) ) { adsIdx = 0 ; } if ( eventsIdx == eventTypes . length ) { eventsIdx = 0 ; } sb . setLength ( 0 ) ; sb . append ( "{\"user_id\":\"" ) ; sb . append ( pageID ) ; sb . append ( "\",\"page_id\":\"" ) ; sb . append ( userID ) ; sb . append ( "\",\"ad_id\":\"" ) ; sb . append ( ads . get ( adsIdx ++ ) ) ; sb . append ( "\",\"ad_type\":\"" ) ; sb . append ( "banner78" ) ; sb . append ( "\",\"event_type\":\"" ) ; sb . append ( eventTypes [ eventsIdx ++ ] ) ; sb . append ( "\",\"event_time\":\"" ) ; sb . append ( System . currentTimeMillis ( ) ) ; sb . append ( "\",\"ip_address\":\"1.2.3.4\"}" ) ; return sb . toString ( ) ; }
generate a single element
