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

Unified Diff: pkg/intl/lib/number_format.dart

Issue 11227042: isEven, isOdd, isNegative, isMaxValue, isMinValue, isInfinite, isPositive, isSingleValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: pkg/intl/lib/number_format.dart
diff --git a/pkg/intl/lib/number_format.dart b/pkg/intl/lib/number_format.dart
index d77490be0546e1b5c578768fca1ae5e79f624205..4ca3eb66ab1fe55c15235b3dda9a2d2353e31c3a 100644
--- a/pkg/intl/lib/number_format.dart
+++ b/pkg/intl/lib/number_format.dart
@@ -90,8 +90,8 @@ class NumberFormat {
String format(num number) {
// TODO(alanknight): Do we have to do anything for printing numbers bidi?
// Or are they always printed left to right?
- if (number.isNaN()) return symbols.NAN;
- if (number.isInfinite()) return "${_signPrefix(number)}${symbols.INFINITY}";
+ if (number.isNaN) return symbols.NAN;
+ if (number.isInfinite) return "${_signPrefix(number)}${symbols.INFINITY}";
_newBuffer();
_add(_signPrefix(number));
@@ -268,7 +268,7 @@ class NumberFormat {
* In en_US this would be '' and '-' respectively.
*/
String _signPrefix(num x) {
- return x.isNegative() ? _negativePrefix : _positivePrefix;
+ return x.isNegative ? _negativePrefix : _positivePrefix;
}
/**
@@ -276,6 +276,6 @@ class NumberFormat {
* In en_US there are no suffixes for positive or negative.
*/
String _signSuffix(num x) {
- return x.isNegative() ? _negativeSuffix : _positiveSuffix;
+ return x.isNegative ? _negativeSuffix : _positiveSuffix;
}
}

Powered by Google App Engine
This is Rietveld 408576698