2011-10-17から1日間の記事一覧

case classのコンパニオンオブジェクト

って書けるんですね 知らなかった・・・ コンパニオンケースクラス case classでobjectが定義されてしまってできないと思っていた コンパイラがすげーよ・・・ case class Foo(i:Int) object Foo { def apply() = new Foo(0) } //scala> Foo //res1: Foo.typ…