blob: 353a1dcac8ae5b02614d76fb527d02eb8b13de70 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import scala.collection.mutable._
trait SB[A] extends Buffer[A] {
import collection.Traversable
abstract override def insertAll(n: Int, iter: Traversable[A]): Unit = synchronized {
super.insertAll(n, iter)
}
abstract override def update(n: Int, newelem: A): Unit = synchronized {
super.update(n, newelem)
}
}
object Test extends Application {
new ArrayBuffer[Int] with SB[Int]
}
|