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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 if (codePoint < MIN_SUPPLEMENTARY_CODE_POINT) { | 118 if (codePoint < MIN_SUPPLEMENTARY_CODE_POINT) { |
119 return new String.fromCharCode(codePoint); | 119 return new String.fromCharCode(codePoint); |
120 } | 120 } |
121 int offset = codePoint - MIN_SUPPLEMENTARY_CODE_POINT; | 121 int offset = codePoint - MIN_SUPPLEMENTARY_CODE_POINT; |
122 int c0 = ((offset & 0x7FFFFFFF) >> 10) + MIN_HIGH_SURROGATE; | 122 int c0 = ((offset & 0x7FFFFFFF) >> 10) + MIN_HIGH_SURROGATE; |
123 int c1 = (offset & 0x3ff) + MIN_LOW_SURROGATE; | 123 int c1 = (offset & 0x3ff) + MIN_LOW_SURROGATE; |
124 return new String.fromCharCodes([c0, c1]); | 124 return new String.fromCharCodes([c0, c1]); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
| 128 @deprecated |
128 abstract class Enum<E extends Enum> implements Comparable<E> { | 129 abstract class Enum<E extends Enum> implements Comparable<E> { |
129 /// The name of this enum constant, as declared in the enum declaration. | 130 /// The name of this enum constant, as declared in the enum declaration. |
130 final String name; | 131 final String name; |
131 | 132 |
132 /// The position in the enum declaration. | 133 /// The position in the enum declaration. |
133 final int ordinal; | 134 final int ordinal; |
134 const Enum(this.name, this.ordinal); | 135 const Enum(this.name, this.ordinal); |
135 int get hashCode => ordinal; | 136 int get hashCode => ordinal; |
136 int compareTo(E other) => ordinal - other.ordinal; | 137 int compareTo(E other) => ordinal - other.ordinal; |
137 String toString() => name; | 138 String toString() => name; |
(...skipping 18 matching lines...) Expand all Loading... |
156 | 157 |
157 void printf(String fmt, List args) { | 158 void printf(String fmt, List args) { |
158 this.print(_printf(fmt, args)); | 159 this.print(_printf(fmt, args)); |
159 } | 160 } |
160 | 161 |
161 void println(String s) { | 162 void println(String s) { |
162 this.print(s); | 163 this.print(s); |
163 this.newLine(); | 164 this.newLine(); |
164 } | 165 } |
165 } | 166 } |
OLD | NEW |