commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: General API question: returning Iterator, Iterable or even Collection?
Date Mon, 03 Jun 2013 13:26:06 GMT
On 2013-06-03, Gary Gregory wrote:

> Why not have the class implement Iterable?

Oh, I'm returning just a subset, so making the whole class iterable
doesn't make sense.  I'm talking about

    public Iterator<ZipArchiveEntry> getEntries(String name)

Stefan

PS: For the general case of "all entries" this might be an option for
Compress 2.x.  Even then we'd still need a different method for
returning entries in a different order - central directory order vs
physical order.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message