| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.generated.java_core; | 5 library analyzer.src.generated.java_core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Inserts the given arguments into [pattern]. | 8 * Inserts the given arguments into [pattern]. |
| 9 * | 9 * |
| 10 * format('Hello, {0}!', 'John') = 'Hello, John!' | 10 * format('Hello, {0}!', 'John') = 'Hello, John!' |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 final String name; | 131 final String name; |
| 132 | 132 |
| 133 /// The position in the enum declaration. | 133 /// The position in the enum declaration. |
| 134 final int ordinal; | 134 final int ordinal; |
| 135 const Enum(this.name, this.ordinal); | 135 const Enum(this.name, this.ordinal); |
| 136 int get hashCode => ordinal; | 136 int get hashCode => ordinal; |
| 137 int compareTo(E other) => ordinal - other.ordinal; | 137 int compareTo(E other) => ordinal - other.ordinal; |
| 138 String toString() => name; | 138 String toString() => name; |
| 139 } | 139 } |
| 140 | 140 |
| 141 @deprecated |
| 141 class PrintStringWriter extends PrintWriter { | 142 class PrintStringWriter extends PrintWriter { |
| 142 final StringBuffer _sb = new StringBuffer(); | 143 final StringBuffer _sb = new StringBuffer(); |
| 143 | 144 |
| 144 void print(x) { | 145 void print(x) { |
| 145 _sb.write(x); | 146 _sb.write(x); |
| 146 } | 147 } |
| 147 | 148 |
| 148 String toString() => _sb.toString(); | 149 String toString() => _sb.toString(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 abstract class PrintWriter { | 152 abstract class PrintWriter { |
| 152 void newLine() { | 153 void newLine() { |
| 153 this.print('\n'); | 154 this.print('\n'); |
| 154 } | 155 } |
| 155 | 156 |
| 156 void print(x); | 157 void print(x); |
| 157 | 158 |
| 158 void printf(String fmt, List args) { | 159 void printf(String fmt, List args) { |
| 159 this.print(_printf(fmt, args)); | 160 this.print(_printf(fmt, args)); |
| 160 } | 161 } |
| 161 | 162 |
| 162 void println(String s) { | 163 void println(String s) { |
| 163 this.print(s); | 164 this.print(s); |
| 164 this.newLine(); | 165 this.newLine(); |
| 165 } | 166 } |
| 166 } | 167 } |
| OLD | NEW |