From be374733d88677f0a2c038c994c304a60d30d30d Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Sun, 12 Nov 2023 18:31:22 -0600 Subject: [PATCH] Updated Enumeration emul for Java 9 (#9861) Partial #9547 --- .../com/google/gwt/emul/java/util/Enumeration.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 1f0c8adce1c..26fc44b0ee2 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(); + } + }; + } }