• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help:

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic