Skip to content

Instantly share code, notes, and snippets.

@gakuzzzz
Created April 26, 2012 02:08
Show Gist options
  • Save gakuzzzz/2495196 to your computer and use it in GitHub Desktop.
Save gakuzzzz/2495196 to your computer and use it in GitHub Desktop.
case class Area(code: String, name: String)
object Area {
val Japan: Set[Area] = Set(
Area("01", "北海道"),
Area("02", "青森県")
// ...
)
val Us: Set[Area] = Set(
Area("AK", "Alaska")
Area("AL", "Alabama")
// ...
)
}
case class Country(code: String, language: String, name: String, areas: Set[Area])
object Country {
val Japan = Country("JPN", "ja", "日本", Area.Japan)
val Us = Country("USA", "en", "United States", Area.Us)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment