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

Unified Diff: corelib/src/set.dart

Issue 10836009: Change Set.add to return a boolean indicating success. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « corelib/src/implementation/hash_map_set.dart ('k') | tests/corelib/set_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/set.dart
diff --git a/corelib/src/set.dart b/corelib/src/set.dart
index 5893cf22ff2307e37448770cded7a2ead97a6905..6f1d396d1a02abe2d13acd83ddcf2386ae946613 100644
--- a/corelib/src/set.dart
+++ b/corelib/src/set.dart
@@ -21,10 +21,10 @@ interface Set<E> extends Collection<E>
bool contains(E value);
/**
- * Adds [value] into the set. The method has no effect if
- * [value] was already in the set.
+ * Adds [value] into the set. Returns true if [value] was not in the set.
+ * The method has no effect if [value] was already in the set.
*/
- void add(E value);
+ bool add(E value);
/**
* Removes [value] from the set. Returns true if [value] was
« no previous file with comments | « corelib/src/implementation/hash_map_set.dart ('k') | tests/corelib/set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698