summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-27 17:29:55 +0000
committerPaul Phillips <paulp@improving.org>2009-11-27 17:29:55 +0000
commitc6fb331ae3315250bc4f1a632dfd81626f800e9f (patch)
tree1962e2c59ca68ab05816d7991bb4f2c8200780aa /src/library
parentb94c73656e2cd18556073522d47d2a12905b3c6c (diff)
downloadscala-c6fb331ae3315250bc4f1a632dfd81626f800e9f.tar.gz
scala-c6fb331ae3315250bc4f1a632dfd81626f800e9f.tar.bz2
scala-c6fb331ae3315250bc4f1a632dfd81626f800e9f.zip
Removed method cached from MapLike - it's an ex...
Removed method cached from MapLike - it's an exact duplicate of getOrElseUpdate. Closes #2715.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/mutable/MapLike.scala9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/library/scala/collection/mutable/MapLike.scala b/src/library/scala/collection/mutable/MapLike.scala
index 9ea83c43c2..f31480c8f9 100644
--- a/src/library/scala/collection/mutable/MapLike.scala
+++ b/src/library/scala/collection/mutable/MapLike.scala
@@ -103,15 +103,6 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]]
*/
override def updated[B1 >: B](key: A, value: B1): mutable.Map[A, B1] = this + ((key, value))
- /** If given key is already in this map, returns associated value
- * Otherwise, computes value from given expression `op`, stores with key
- * in map and returns that value.
- */
- def cached(key: A, op: => B) = get(key) match {
- case Some(v) => v
- case None => val v = op; update(key, v); v
- }
-
/** Add a new key/value mapping and return the map itself.
*
* @param kv the key/value mapping to be added