From f0d28aa4851d7b4195c7d2c8aaf49d6b9eaafd86 Mon Sep 17 00:00:00 2001 From: Blair Zajac Date: Thu, 8 Dec 2011 17:40:41 -0800 Subject: Clarify scala.collection.immutable.Map#withDefaultValue() docs. Copy the documentation from Map#withDefault() that get(), contains(), iterator(), and keys() keys are not affected by withDefaultValue(). --- src/library/scala/collection/immutable/Map.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/library') diff --git a/src/library/scala/collection/immutable/Map.scala b/src/library/scala/collection/immutable/Map.scala index 45cf088dd9..bbefd983fd 100644 --- a/src/library/scala/collection/immutable/Map.scala +++ b/src/library/scala/collection/immutable/Map.scala @@ -47,6 +47,7 @@ trait Map[A, +B] extends Iterable[(A, B)] def withDefault[B1 >: B](d: A => B1): immutable.Map[A, B1] = new Map.WithDefault[A, B1](this, d) /** The same map with a given default value. + * Note: `get`, `contains`, `iterator`, `keys`, etc are not affected by `withDefaultValue`. * * Invoking transformer methods (e.g. `map`) will not preserve the default value. * -- cgit v1.2.3