Re: [collections] Re: /PROPOSAL 1/ Additions to IteratorUtils

2003-11-24 Thread Stephen Colebourne
It seems like an odd thing to want to do. If you need to know the size, hold the data in a collection. Stephen - Original Message - > In the current CVS HEAD, you can do > > IteratorUtils.toArray(Iterator).length > or > IteratorUtils.toList(Iterator).size() > > But, your suggestion may be

[collections] Re: /PROPOSAL 1/ Additions to IteratorUtils

2003-11-24 Thread __matthewHawthorne
( Remember to prefix subject with [collections] ) In the current CVS HEAD, you can do IteratorUtils.toArray(Iterator).length or IteratorUtils.toList(Iterator).size() But, your suggestion may be a good addition also. Also, I think that the method definitions you've provided will all cause infini

/PROPOSAL 1/ Additions to IteratorUtils

2003-11-24 Thread Lee Crawford
I'd like to propose the following simple additions to the o.a.c.c.IteratorUtils class. The following is a simple convenience method for counting the number of elements in an iteration, something that I find myself recreating somewhat frequently: public static int countElements (final Iterat