diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
commit | 0c8e2195960d47e5b9be93efb7c95802ae40dca6 (patch) | |
tree | 4546dbdde688402560032002b62fbea9d84b1343 /src/library/scala/collection/immutable/MapLike.scala | |
parent | ec127ce60de679809a75c3c85f25ec4256b9dd13 (diff) | |
download | scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.gz scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.bz2 scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.zip |
TraversableOnce. Review by odersky.
Diffstat (limited to 'src/library/scala/collection/immutable/MapLike.scala')
-rw-r--r-- | src/library/scala/collection/immutable/MapLike.scala | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/library/scala/collection/immutable/MapLike.scala b/src/library/scala/collection/immutable/MapLike.scala index 0a3a8a3645..662321bb0c 100644 --- a/src/library/scala/collection/immutable/MapLike.scala +++ b/src/library/scala/collection/immutable/MapLike.scala @@ -75,16 +75,8 @@ trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]] * * @param elems the traversable object. */ - override def ++[B1 >: B](elems: Traversable[(A, B1)]): immutable.Map[A, B1] = - ((repr: immutable.Map[A, B1]) /: elems) (_ + _) - - /** Adds a number of elements provided by an iterator - * and returns a new collection with the added elements. - * - * @param iter the iterator - */ - override def ++[B1 >: B] (iter: Iterator[(A, B1)]): immutable.Map[A, B1] = - ((repr: immutable.Map[A, B1]) /: iter) (_ + _) + override def ++[B1 >: B](xs: TraversableOnce[(A, B1)]): immutable.Map[A, B1] = + ((repr: immutable.Map[A, B1]) /: xs) (_ + _) /** Filters this map by retaining only keys satisfying a predicate. * @param p the predicate used to test keys |