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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart
index a5a7b89808202cd4bfccbb40ff13ebf0580126a1..803c97e4a3f86f4860e3e197607a1b92b5a2e46e 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart
@@ -30,6 +30,7 @@ patch class HashMap<K, V> {
patch int get length => _length;
patch bool get isEmpty => _length == 0;
+ patch bool get isNotEmpty => !isEmpty;
patch Iterable<K> get keys {
return new HashMapKeyIterable<K>(this);
@@ -391,6 +392,8 @@ patch class LinkedHashMap<K, V> {
patch int get length => _length;
patch bool get isEmpty => _length == 0;
+ patch bool get isNotEmpty => !isEmpty;
+
patch Iterable<K> get keys {
return new LinkedHashMapKeyIterable<K>(this);
@@ -744,6 +747,7 @@ patch class HashSet<E> {
patch int get length => _length;
patch bool get isEmpty => _length == 0;
+ patch bool get isNotEmpty => !isEmpty;
patch bool contains(Object object) {
if (_isStringElement(object)) {
@@ -1038,6 +1042,7 @@ patch class LinkedHashSet<E> extends _HashSetBase<E> {
patch int get length => _length;
patch bool get isEmpty => _length == 0;
+ patch bool get isNotEmpty => !isEmpty;
patch bool contains(Object object) {
if (_isStringElement(object)) {

Powered by Google App Engine
This is Rietveld 408576698