| OLD | NEW |
| 1 library java.core; | 1 library java.core; |
| 2 | 2 |
| 3 import "dart:math" as math; | 3 import "dart:math" as math; |
| 4 import "dart:collection" show ListBase; | 4 import "dart:collection" show ListBase; |
| 5 | 5 |
| 6 class JavaSystem { | 6 class JavaSystem { |
| 7 static int currentTimeMillis() { | 7 static int currentTimeMillis() { |
| 8 return (new DateTime.now()).millisecondsSinceEpoch; | 8 return (new DateTime.now()).millisecondsSinceEpoch; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } else if (sb.length > newLength) { | 547 } else if (sb.length > newLength) { |
| 548 var s = sb.toString().substring(0, newLength); | 548 var s = sb.toString().substring(0, newLength); |
| 549 sb = new StringBuffer(s); | 549 sb = new StringBuffer(s); |
| 550 } | 550 } |
| 551 } | 551 } |
| 552 void clear() { | 552 void clear() { |
| 553 sb = new StringBuffer(); | 553 sb = new StringBuffer(); |
| 554 } | 554 } |
| 555 } | 555 } |
| 556 | 556 |
| 557 abstract class Enum<E> implements Comparable<E> { | 557 abstract class Enum<E extends Enum> implements Comparable<E> { |
| 558 int get ordinal; | 558 /// The name of this enum constant, as declared in the enum declaration. |
| 559 String get name; | 559 final String name; |
| 560 /// The position in the enum declaration. |
| 561 final int ordinal; |
| 562 Enum(this.name, this.ordinal); |
| 563 int get hashCode => ordinal; |
| 564 String toString() => name; |
| 565 int compareTo(E other) => ordinal - other.ordinal; |
| 560 } | 566 } |
| OLD | NEW |