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

Unified Diff: runtime/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
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/collection_patch.dart
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 1ddd5d91dfd69b01f37d2baa9d205544d679057d..6479ba2f9e5939e78505a545b5f3da6093b05b8b 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -109,6 +109,8 @@ patch class HashMap<K, V> {
/* patch */ int get length => _hashTable._elementCount;
/* patch */ bool get isEmpty => _hashTable._elementCount == 0;
+
+ /* patch */ bool get isNotEmpty => !isEmpty;
}
patch class HashSet<E> {
@@ -130,6 +132,8 @@ patch class HashSet<E> {
/* patch */ bool get isEmpty => _table._elementCount == 0;
+ /* patch */ bool get isNotEmpty => !isEmpty;
+
/* patch */ bool contains(Object object) => _table._get(object) >= 0;
// Collection.
@@ -300,6 +304,8 @@ patch class LinkedHashMap<K, V> {
/* patch */ int get length => _hashTable._elementCount;
/* patch */ bool get isEmpty => _hashTable._elementCount == 0;
+
+ /* patch */ bool get isNotEmpty => !isEmpty;
}
patch class LinkedHashSet<E> extends _HashSetBase<E> {
@@ -320,6 +326,8 @@ patch class LinkedHashSet<E> extends _HashSetBase<E> {
/* patch */ bool get isEmpty => _table._elementCount == 0;
+ /* patch */ bool get isNotEmpty => !isEmpty;
+
/* patch */ bool contains(Object object) => _table._get(object) >= 0;
/* patch */ void forEach(void action(E element)) {
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698