mysema/scalagen — Issue #21: simplify equals implementations
Author: timowest
Created: 2012-01-08 11:40:51+00:00
State: open

turn

override def equals(obj: Any): Boolean = {
if (obj == this) {
true
} else if (obj.isInstanceOf[JoinFlag]) {
obj.asInstanceOf[JoinFlag].flag == flag
} else {
false
}
}

into

override def equals(obj: Any) : Boolean = obj match {
case obj: JoingFlag => obj.flag == flag
case _ => null
}