Skip to content

Commit 519906b

Browse files
committed
trait trait -> trait
1 parent a136167 commit 519906b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

overviews/collections/maps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Note that the second argument to `getOrElseUpdate` is "by-name", so the computat
110110

111111
### Synchronized Sets and Maps ###
112112

113-
To get a thread-safe mutable map, you can mix the `SynchronizedMap` trait trait into whatever particular map implementation you desire. For example, you can mix `SynchronizedMap` into `HashMap`, as shown in the code below. This example begins with an import of two traits, `Map` and `SynchronizedMap`, and one class, `HashMap`, from package `scala.collection.mutable`. The rest of the example is the definition of singleton object `MapMaker`, which declares one method, `makeMap`. The `makeMap` method declares its result type to be a mutable map of string keys to string values.
113+
To get a thread-safe mutable map, you can mix the `SynchronizedMap` trait into whatever particular map implementation you desire. For example, you can mix `SynchronizedMap` into `HashMap`, as shown in the code below. This example begins with an import of two traits, `Map` and `SynchronizedMap`, and one class, `HashMap`, from package `scala.collection.mutable`. The rest of the example is the definition of singleton object `MapMaker`, which declares one method, `makeMap`. The `makeMap` method declares its result type to be a mutable map of string keys to string values.
114114

115115
import scala.collection.mutable.{Map,
116116
SynchronizedMap, HashMap}

0 commit comments

Comments
 (0)