How can I compare a Scala list with a Java list?
scala> List(1, 2, 3, 4, 5)
res0: List[Int] = List(1, 2, 3, 4, 5)
scala> java.util.Arrays.asList(1, 2, 3, 4, 5)
res1: java.util.List[Int] = [1, 2, 3, 4, 5]
scala> res0 == res1
res2: Boolean = false
Is there some static helper method for comparison that accepts both Scala lists and Java lists? Or is there a kind of “lazy wrapper” over both sorts of lists which I can then directly compare via ==?
… or use
sameElements.