Created
May 21, 2014 23:19
-
-
Save cb372/59fc6c25b51db0a3b4ba to your computer and use it in GitHub Desktop.
Case class WTF
This file contains hidden or 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 Tweet(userId: Long, country: String, firstName: String, secondName: String) | |
res57: Seq[Tweet] = ArrayBuffer(Tweet(625052628,United States,matt,todorowski), Tweet(625052628,United States,matt,todorowski)) | |
scala> res57(0).id == res57(1).id | |
res59: Boolean = true | |
scala> res57(0).country == res57(1).country | |
res60: Boolean = true | |
scala> res57(0).firstName == res57(1).firstName | |
res61: Boolean = true | |
scala> res57(0).secondName == res57(1).secondName | |
res62: Boolean = true | |
// All the fields match, but ... | |
scala> res57(0) == res57(1) | |
res58: Boolean = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment