This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Help: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help:" Watch "Help:" New topic
Author

Help:

James O Brien
Greenhorn

Joined: Dec 22, 2003
Posts: 5
I was wondering what is the best way to write an ProductListIterator which is an iteration of an thetha joins of objects in a Array of lists.

Elements of each list are accessed in chucks of blockSize elements to cut down the number of times each list is iterated. For each combination of elements, the elements are combined using the supplied combiner object and the result is part of the resulting list.
constructor=public ProductList(List[] lists, Combiner combiner, int blockSize)
class= class ProductListIterator implements ListIterator
method working on = public productListIterator()
Any help appreciated
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
By the way, why do ur class ProductListIterator need to implement ListIterator? Actually u can get an Itereator from the List[] and loop using that iterator...
One thing is that the information u provided here is not enough for us to give u the solution that u want... Could u please provide more info on it, if u still cannot solve ur problem?


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
 
jQuery in Action, 2nd edition
 
subject: Help:
 
Similar Threads
Hadoop MapReduce
Subdividing a Collection into smaller collections
Out of Memory error
Sorting two Classes
find sublist