ArrayBuffer extends ResizableArray which include a protected method, swap. Yet I can't access swap. What am I missing?
scala> import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable.ArrayBuffer
scala> val x=new ArrayBuffer[Int]()
x: scala.collection.mutable.ArrayBuffer[Int] = ArrayBuffer()
scala> x+=3
scala> x+=5
scala> x.swap(0,1)
<console>:7: error: method swap cannot be accessed in scala.collection.mutable.ArrayBuffer[Int]
x.swap(0,1)
^