From 3f48391ce5972bdd5813eae661a1dceede5ce5f4 Mon Sep 17 00:00:00 2001 From: Rex Kerr Date: Fri, 21 Nov 2014 12:40:53 -0800 Subject: SI-8783 MultiMap documentation for addBinding is incorrect Fixed documentation to state that addBinding will not replace a `value` that is equal (according to ==). --- src/library/scala/collection/mutable/MultiMap.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/library') 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. -- cgit v1.2.3