RFR(s): 8072726: add adapter to convert Enumeration to Iterator
stuart.marks at oracle.com
Sun May 17 00:26:58 UTC 2015
Yeah, interesting. I think "convert" has too much of an implication of the
resulting Iterator being independent of the underlying Enumeration, which it
isn't. "View" is a good word, but it has to be understood with a specific
meaning, e.g., List.subList creates a view of an underlying list. Perhaps
"wrapper" would be good because it explains exactly what's going on. I'll mull
this over a bit and see if I can come up with something better.
On 5/16/15 12:25 PM, Chris Hegarty wrote:
> This looks very useful. The javadoc reads well, and I think it is pitched at the right level ( view the Enumeration as an Iterator ). I expected to see ‘view’ or ‘convert’ in the javadoc, but what you have reads fine too.
>> On 16 May 2015, at 01:37, Stuart Marks <stuart.marks at oracle.com> wrote:
>> Hi all,
>> Please review this small API enhancement to add a default method "asIterator()" to Enumeration that converts it into an Iterator.
More information about the core-libs-dev