Enumeration adapters in SE 8
Stephen Colebourne
scolebourne at joda.org
Wed Aug 24 13:34:56 PDT 2011
On 24 August 2011 19:10, Dan Smith <daniel.smith at oracle.com> wrote:
> I was pointed to some comments on core-libs about adapting Enumerations to for loops in SE 8. (Sorry for the new thread -- I wasn't subscribed.) It turns out lambdas + extension methods will make this very easy.
>
> In the API:
>
> interface Enumeration<E> extends Iterator<E> {
> boolean hasMoreElements();
> E nextElement();
> boolean hasNext() default #hasMoreElements;
> E next() default #nextElement;
> void remove() default { throw new UnsupportedOperationException(); }
> }
This seems sensible.
Is this made up syntax, or another EG decision?
void remove() default { throw new UnsupportedOperationException(); }
Stephen
More information about the lambda-dev
mailing list