diff options
author | Rex Kerr <ichoran@gmail.com> | 2014-11-21 12:40:53 -0800 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2014-11-21 12:40:53 -0800 |
commit | 3f48391ce5972bdd5813eae661a1dceede5ce5f4 (patch) | |
tree | d10aef469e069f5f690e267cd8cad68a846b466c /src/library | |
parent | c4df20d29a8d15ef23cf0d10fad56da0791bbbf6 (diff) | |
download | scala-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 ==).
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/mutable/MultiMap.scala | 7 |
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. |