Index: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart |
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart |
index f4b3937205dc5319f160445c3274982743570833..c3dadd0d2165b02dbdf197271e9fbf26b1c5806b 100644 |
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart |
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart |
@@ -554,7 +554,13 @@ class JavaStringBuilder { |
} |
} |
-abstract class Enum<E> implements Comparable<E> { |
- int get ordinal; |
- String get name; |
+abstract class Enum<E extends Enum> implements Comparable<E> { |
+ /// The name of this enum constant, as declared in the enum declaration. |
+ final String name; |
+ /// The position in the enum declaration. |
+ final int ordinal; |
+ Enum(this.name, this.ordinal); |
+ int get hashCode => ordinal; |
+ String toString() => name; |
+ int compareTo(E other) => ordinal - other.ordinal; |
} |