Answer inline:
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Geir Magnusson Jr.
>
> ....
>
> > Just accepting an Iterator as the object to iterate trough in the
> > #foreach.
>
> Yes. Ok. Agreed.
>
> ........
>
> > Yes, it works correctly but it would be more efficient to make the
> > caching just using the listObject class as key.
>
> sorry?
Now you cache what Iterator you got per Iterator object but it would be
more efficient to cache it per listObject's class (listObject being the
object to iterate trough in the #foreach).
>...
>
> > That is a case where I would be better served with an Iterator as
> > argument for the #foreach, since an Iterator over a ResultSet is so
> > easy to implement.
> > =:o)
>
> I thought I had you above, but I seem to have lost you again : an
> Iterator is used in the foreach. I am cleaning up getIterator() a
> little as per your's and Jeff's suggestions...
Yes, you get Iterator's from object arrays, Collection's and Map's ...
...but what happens if the object to iterate trough in the #foreach is
_already_ an Iterator???
> > Have fun,
> > Paulo
>
> Always do!
>
> geir
Doing my best to have it here too,
=:o)
Paulo