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
( 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
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