On 11/01/11 14:39, Chris Dollin wrote:
> (For ExtendedIterator I just use .list().size() and take the hit of
>  materialising the list. 
That could be a big hit though.

> .size() or .count() would be a reasonable 
> addition; calling it .countRemaining() is more explicit than I'd
> choose myself.)
size() would be OK ... I was just worrying that the contract isn't
clear, since it couldn't count any already-consumed members of the
iterator. I suppose the javadoc could be super-clear: people always read
that before posting a question, right? :)

Ian

-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:[email protected]        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
              Portishead, Bristol BS20 6PT, UK

Reply via email to