Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/java_core.dart

Issue 16059002: Manual fixes for Dart^2 analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 import "dart:collection" show ListBase; 5 import "dart:collection" show ListBase;
6 6
7 class JavaSystem { 7 class JavaSystem {
8 static int currentTimeMillis() { 8 static int currentTimeMillis() {
9 return (new DateTime.now()).millisecondsSinceEpoch; 9 return (new DateTime.now()).millisecondsSinceEpoch;
10 } 10 }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 void addLast(E value) { 313 void addLast(E value) {
314 elements.add(value); 314 elements.add(value);
315 } 315 }
316 316
317 void addAll(Iterable<E> iterable) { 317 void addAll(Iterable<E> iterable) {
318 elements.addAll(iterable); 318 elements.addAll(iterable);
319 } 319 }
320 320
321 void setAll(int index, Iterable<E> iterable) { 321 void setAll(int index, Iterable<E> iterable) {
322 elements.setAll(iterable); 322 elements.setAll(index, iterable);
323 } 323 }
324 324
325 void sort([int compare(E a, E b)]) { 325 void sort([int compare(E a, E b)]) {
326 elements.sort(compare); 326 elements.sort(compare);
327 } 327 }
328 328
329 int indexOf(E element, [int start = 0]) { 329 int indexOf(E element, [int start = 0]) {
330 return elements.indexOf(element, start); 330 return elements.indexOf(element, start);
331 } 331 }
332 332
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 return a.toLowerCase() == b.toLowerCase(); 455 return a.toLowerCase() == b.toLowerCase();
456 } 456 }
457 457
458 bool javaBooleanOr(bool a, bool b) { 458 bool javaBooleanOr(bool a, bool b) {
459 return a || b; 459 return a || b;
460 } 460 }
461 461
462 class JavaStringBuilder { 462 class JavaStringBuilder {
463 StringBuffer sb = new StringBuffer(); 463 StringBuffer sb = new StringBuffer();
464 String toString() => sb.toString(); 464 String toString() => sb.toString();
465 void append(x) { 465 JavaStringBuilder append(x) {
466 sb.write(x); 466 sb.write(x);
467 return this;
467 } 468 }
468 void appendChar(int c) { 469 JavaStringBuilder appendChar(int c) {
469 sb.writeCharCode(c); 470 sb.writeCharCode(c);
471 return this;
470 } 472 }
471 int get length => sb.length; 473 int get length => sb.length;
472 void set length(int newLength) { 474 void set length(int newLength) {
473 if (newLength < 0) { 475 if (newLength < 0) {
474 throw new StringIndexOutOfBoundsException(newLength); 476 throw new StringIndexOutOfBoundsException(newLength);
475 } 477 }
476 if (sb.length < newLength) { 478 if (sb.length < newLength) {
477 while (sb.length < newLength) { 479 while (sb.length < newLength) {
478 sb.writeCharCode(0); 480 sb.writeCharCode(0);
479 } 481 }
480 } else if (sb.length > newLength) { 482 } else if (sb.length > newLength) {
481 var s = sb.toString().substring(0, newLength); 483 var s = sb.toString().substring(0, newLength);
482 sb = new StringBuffer(s); 484 sb = new StringBuffer(s);
483 } 485 }
484 } 486 }
485 void clear() { 487 void clear() {
486 sb = new StringBuffer(); 488 sb = new StringBuffer();
487 } 489 }
488 } 490 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/error.dart ('k') | pkg/analyzer_experimental/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698