32. trait Entity[ID <: Identity[_]] { ! /** ã¨ã³ãã£ãã£ã®èå¥åã */ val identity: ID ! override final def hashCode: Int = 31 * identity.## ! override final def equals(obj: Any): Boolean = obj match { case that: Entity[_] => identity == that.identity case _ => false } ! } 33. trait Identity[+A] extends Serializable { ! def value: A ! } ! object EmptyIdentity extends Identity[Nothing] { ! def value = throw E
{{#tags}}- {{label}}
{{/tags}}