Guest User

Untitled

a guest
Sep 13th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.21 KB | None | 0 0
  1. class Button extends AbstractButton {
  2.   def void2This(b: Button => Unit): Button = {val ret = this.clone().asInstanceOf[Button]; b(ret); ret}
  3.   def changeText(text: String): Button = void2This(_.setText(text))
  4. }
Add Comment
Please, Sign In to add comment