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

Side by Side Diff: sdk/lib/core/bool.dart

Issue 2563633002: Make the VM's dart:core and dart:async library patches clean. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * The reserved words [:true:] and [:false:] denote objects that are the only 8 * The reserved words [:true:] and [:false:] denote objects that are the only
9 * instances of this class. 9 * instances of this class.
10 * 10 *
(...skipping 23 matching lines...) Expand all
34 * const loggingFlag = const bool.fromEnvironment("logging"); 34 * const loggingFlag = const bool.fromEnvironment("logging");
35 * 35 *
36 * If you want to use a different truth-string than `"true"`, you can use the 36 * If you want to use a different truth-string than `"true"`, you can use the
37 * [String.fromEnvironment] constructor directly: 37 * [String.fromEnvironment] constructor directly:
38 * 38 *
39 * const isLoggingOn = (const String.fromEnvironment("logging") == "on"); 39 * const isLoggingOn = (const String.fromEnvironment("logging") == "on");
40 */ 40 */
41 external const factory bool.fromEnvironment(String name, 41 external const factory bool.fromEnvironment(String name,
42 {bool defaultValue: false}); 42 {bool defaultValue: false});
43 43
44 // TODO: Doc comment please.
Lasse Reichstein Nielsen 2016/12/08 12:25:32 Shouldn't be necessary. It satisfies the requireme
Kevin Millikin (Google) 2016/12/09 08:38:59 Done.
45 external int get hashCode;
46
44 /** 47 /**
45 * Returns [:"true":] if the receiver is [:true:], or [:"false":] if the 48 * Returns [:"true":] if the receiver is [:true:], or [:"false":] if the
46 * receiver is [:false:]. 49 * receiver is [:false:].
47 */ 50 */
48 String toString() { 51 String toString() {
49 return this ? "true" : "false"; 52 return this ? "true" : "false";
50 } 53 }
51 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698