Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created September 14, 2009 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mneedham/186613 to your computer and use it in GitHub Desktop.
Save mneedham/186613 to your computer and use it in GitHub Desktop.
class MyContainer[T] {
private var obj:T = null
def value = obj
def value_=(v:T) = obj = v
}
val cont = new MyContainer[String]
cont.value = "Daniel"
println(cont.value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment