SHARE
TWEET

Untitled

a guest Jun 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sealed class SomeThing {
  2.   abstract fun run()
  3.   abstract fun play()
  4. }
  5.  
  6. class Thing1: SomeThing() {
  7.   override fun run() = println("Run Fast!")
  8.   override fun play() = println("Play Hard!")
  9. }
  10. class Thing2: SomeThing() {
  11.   override fun run() = println("Run Silly!")
  12.   override fun play() = println("Play Soft!")
  13. }
  14.  
  15. class NoThing {} // not part of the sealed class eh? no instantiation for you!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top