Skip to content

Instantly share code, notes, and snippets.

@kmizu
Created October 8, 2010 01:45
Show Gist options
  • Save kmizu/616228 to your computer and use it in GitHub Desktop.
Save kmizu/616228 to your computer and use it in GitHub Desktop.
import java.util.ArrayList
trait MyArrayList[T] extends ArrayList[T] {
override def add(e: T): Boolean = {
println("added: " + e)
super.add(e)
}
}
val list = new MyArrayList[String]{}
list.add("A")
list.add("B")
list.add("C")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment