diff --git a/user/super/com/google/gwt/emul/java/util/Enumeration.java b/user/super/com/google/gwt/emul/java/util/Enumeration.java index 1f0c8adce1..26fc44b0ee 100644 --- a/user/super/com/google/gwt/emul/java/util/Enumeration.java +++ b/user/super/com/google/gwt/emul/java/util/Enumeration.java @@ -27,4 +27,17 @@ public interface Enumeration { boolean hasMoreElements(); E nextElement(); + + default Iterator asIterator() { + return new Iterator() { + @Override + public boolean hasNext() { + return hasMoreElements(); + } + @Override + public E next() { + return nextElement(); + } + }; + } }