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

Unified Diff: sdk/lib/core/set.dart

Issue 26280002: Set.add returns true if item has been added, otherwise false (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: docs Created 7 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
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.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: sdk/lib/core/set.dart
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 19be402b71fe579abfc4191ea6faa4d3299dfaba..eff0b42c9decb2d5ca966b4420276ccc8dd03a5a 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -53,11 +53,11 @@ abstract class Set<E> extends IterableBase<E> {
bool contains(Object value);
/**
- * Adds [value] into the set.
+ * Adds [value] into the set. Returns `true` if [value] was added to the set.
Lasse Reichstein Nielsen 2013/10/08 12:35:03 Put "Returns ..." sentence at the end of the dartd
*
- * The method has no effect if [value] is already in the set.
+ * If [value] already exists, the set is not changed and `false` is returned.
*/
- void add(E value);
+ bool add(E value);
/**
* Adds all of [elements] to this Set.
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.dart ('k') | tests/corelib/set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698