Skip to content

Instantly share code, notes, and snippets.

@cb372
Created May 21, 2014 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cb372/59fc6c25b51db0a3b4ba to your computer and use it in GitHub Desktop.
Save cb372/59fc6c25b51db0a3b4ba to your computer and use it in GitHub Desktop.
Case class WTF
// 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