| 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:uri"; | 4 import "dart:uri"; |
| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (0x61 <= codePoint && codePoint <= 0x66) { | 101 if (0x61 <= codePoint && codePoint <= 0x66) { |
| 102 return 0xA + (codePoint - 0x61); | 102 return 0xA + (codePoint - 0x61); |
| 103 } | 103 } |
| 104 return -1; | 104 return -1; |
| 105 } | 105 } |
| 106 static String toChars(int codePoint) { | 106 static String toChars(int codePoint) { |
| 107 throw new UnsupportedOperationException(); | 107 throw new UnsupportedOperationException(); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 class CharBuffer { | 111 class CharSequence { |
| 112 final String _content; | 112 final String _content; |
| 113 CharBuffer(this._content); | 113 CharSequence(this._content); |
| 114 static CharBuffer wrap(String content) => new CharBuffer(content); | 114 static CharSequence wrap(String content) => new CharBuffer(content); |
| 115 int charAt(int index) => _content.codeUnitAt(index); | 115 int charAt(int index) => _content.codeUnitAt(index); |
| 116 int length() => _content.length; | 116 int length() => _content.length; |
| 117 String subSequence(int start, int end) => _content.substring(start, end); | 117 String subSequence(int start, int end) => _content.substring(start, end); |
| 118 } | 118 } |
| 119 | 119 |
| 120 class CharBuffer extends CharSequence { |
| 121 CharBuffer(String content) : super(content); |
| 122 static CharBuffer wrap(String content) => new CharBuffer(content); |
| 123 } |
| 124 |
| 120 class JavaString { | 125 class JavaString { |
| 121 static String format(String fmt, List args) { | 126 static String format(String fmt, List args) { |
| 122 return fmt; | 127 return fmt; |
| 123 } | 128 } |
| 124 } | 129 } |
| 125 | 130 |
| 126 /** | 131 /** |
| 127 * Very limited printf implementation, supports only %s and %d. | 132 * Very limited printf implementation, supports only %s and %d. |
| 128 */ | 133 */ |
| 129 String _printf(String fmt, List args) { | 134 String _printf(String fmt, List args) { |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 } | 437 } |
| 433 } else if (sb.length > newLength) { | 438 } else if (sb.length > newLength) { |
| 434 var s = sb.toString().substring(0, newLength); | 439 var s = sb.toString().substring(0, newLength); |
| 435 sb = new StringBuffer(s); | 440 sb = new StringBuffer(s); |
| 436 } | 441 } |
| 437 } | 442 } |
| 438 void clear() { | 443 void clear() { |
| 439 sb = new StringBuffer(); | 444 sb = new StringBuffer(); |
| 440 } | 445 } |
| 441 } | 446 } |
| OLD | NEW |