Skip to content

Commit

Permalink
Updated Enumeration emul for Java 9 (#9861)
Browse files Browse the repository at this point in the history
Partial #9547
  • Loading branch information
niloc132 authored Nov 13, 2023
1 parent 1ca97c4 commit be37473
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions user/super/com/google/gwt/emul/java/util/Enumeration.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,17 @@ public interface Enumeration<E> {
boolean hasMoreElements();

E nextElement();

default Iterator<E> asIterator() {
return new Iterator<E>() {
@Override
public boolean hasNext() {
return hasMoreElements();
}
@Override
public E next() {
return nextElement();
}
};
}
}

0 comments on commit be37473

Please sign in to comment.