As an alternative, you may want to look at Guava [1], which has some nice Iterator support (including .size()) [2] and an Apache license.
-Stephen [1] http://code.google.com/p/guava-libraries/ [2] http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/co llect/Iterators.html -----Original Message----- From: Chris Dollin [mailto:[email protected]] Sent: Tuesday, January 11, 2011 9:39 AM To: [email protected] Subject: Re: Counting from the API On Tuesday, January 11, 2011 02:20:48 pm Ian Dickinson wrote: > On 11/01/11 14:16, Andy Seaborne wrote: > > (The mysterious undocumented Iter class...) > OK, so the Jira item should be to make Iter less mysterious and more > documented. I had never heard of it :) I believe it's an ARQ thing. (For ExtendedIterator I just use .list().size() and take the hit of materialising the list. .size() or .count() would be a reasonable addition; calling it .countRemaining() is more explicit than I'd choose myself.) Chris -- "There are questions, so many questions" /Script Switch Trigger/ Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)
