Created
December 9, 2015 17:49
-
-
Save devth/beb46c791c4ca2ae7ea1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class DissertationRow( | |
name: Option[String]=None, | |
birthYear: Option[Int]=None, | |
dissertation: Option[String]=None) extends Row { | |
def setValueForOrdinal[A](ord: Int, value: A): DissertationRow = | |
ord match { | |
case 0 => this.copy(name = Some(value.asInstanceOf[String])) | |
case 1 => this.copy(birthYear = Some(value.asInstanceOf[Int])) | |
case 2 => this.copy(dissertation = Some(value.asInstanceOf[String])) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment