Skip to content

Instantly share code, notes, and snippets.

@xeno-by
Created July 12, 2013 16:03
Show Gist options
  • Save xeno-by/5985573 to your computer and use it in GitHub Desktop.
Save xeno-by/5985573 to your computer and use it in GitHub Desktop.
sealed abstract class Character
case object Violent extends Character
case object Weak extends Character
case object Clever extends Character
case object Dumb extends Character
case object Stupid extends Character
case class Person (
id: DId,
name: String
age: Long
birth: Date
characters: Set[Character]
)
=========
val john = Person(johnId, "John", 35, new java.util.Date(), Set(Violent, Clever))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment