diff options
Diffstat (limited to 'src/library/scala/collection/mutable/OpenHashMap.scala')
-rw-r--r-- | src/library/scala/collection/mutable/OpenHashMap.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/OpenHashMap.scala b/src/library/scala/collection/mutable/OpenHashMap.scala index 3c84721b9e..5a0810cfe4 100644 --- a/src/library/scala/collection/mutable/OpenHashMap.scala +++ b/src/library/scala/collection/mutable/OpenHashMap.scala @@ -106,6 +106,9 @@ class OpenHashMap[Key, Value](initialSize : Int) extends scala.collection.mutabl put(key, hashOf(key), value); } + def += (kv: (Key, Value)): this.type = { put(kv._1, kv._2); this } + def -= (key: Key): this.type = { remove(key); this } + override def put(key : Key, value : Value): Option[Value] = put(key, hashOf(key), value) @@ -137,8 +140,6 @@ class OpenHashMap[Key, Value](initialSize : Int) extends scala.collection.mutabl } else None } - override def delete(key: Key) { remove(key) } - def get(key : Key) : Option[Value] = { val hash = hashOf(key); |