java - Multiple ArrayList with 10 records using iterator and ArrayList -


mutliple arraylist<> 10 records. have used limiting upto 10 results , how next 10 results , on.

try { arraylist<calanderqueryoutput> results = new arraylist<calanderqueryoutput>();  list<?> eventstoday = (list<?>) filter.filter(calendar.getcomponents(component.vevent)); calanderqueryoutput caldavoutput = new calanderqueryoutput();  (iterator<?> = eventstoday.iterator(); i.hasnext();) { if(limit < rslimit){     results.add(caldavoutput);       limit++;     }       }   } 

first of need other data strcuture store multiple arraylists, can use list of list

list<list<calanderqueryoutput>> resultlist = new arraylist<list<calanderqueryoutput>>(); list<calanderqueryoutput> results = new arraylist<calanderqueryoutput>(); (iterator<?> = eventstoday.iterator(); i.hasnext();) { if(limit < rslimit){     results.add(caldavoutput);       limit++;     }else{      resultlist.add(results);      limit = 0;      results = new arraylist<calanderqueryoutput>(); }       } 

}


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -