summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Kerr <ichoran@gmail.com>2014-11-21 12:40:53 -0800
committerRex Kerr <ichoran@gmail.com>2014-11-21 12:40:53 -0800
commit3f48391ce5972bdd5813eae661a1dceede5ce5f4 (patch)
treed10aef469e069f5f690e267cd8cad68a846b466c
parentc4df20d29a8d15ef23cf0d10fad56da0791bbbf6 (diff)
downloadscala-3f48391ce5972bdd5813eae661a1dceede5ce5f4.tar.gz
scala-3f48391ce5972bdd5813eae661a1dceede5ce5f4.tar.bz2
scala-3f48391ce5972bdd5813eae661a1dceede5ce5f4.zip
SI-8783 MultiMap documentation for addBinding is incorrect
Fixed documentation to state that addBinding will not replace a `value` that is equal (according to ==).
-rw-r--r--src/library/scala/collection/mutable/MultiMap.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/library/scala/collection/mutable/MultiMap.scala b/src/library/scala/collection/mutable/MultiMap.scala
index 78dfc35268..ac2ebf31d8 100644
--- a/src/library/scala/collection/mutable/MultiMap.scala
+++ b/src/library/scala/collection/mutable/MultiMap.scala
@@ -65,10 +65,9 @@ trait MultiMap[A, B] extends Map[A, Set[B]] {
*/
protected def makeSet: Set[B] = new HashSet[B]
- /** Assigns the specified `value` to a specified `key`, replacing
- * the existing value assigned to that `key` if it is equal to
- * the specified value. Otherwise, simply adds another binding to
- * the `key`.
+ /** Assigns the specified `value` to a specified `key`. If the key
+ * already has a binding to equal to `value`, nothing is changed;
+ * otherwise a new binding is added for that `key`.
*
* @param key The key to which to bind the new value.
* @param value The value to bind to the key.