vicpinm
10/05/2017, 7:57 AMvoddan
10/05/2017, 8:48 AMvicpinm
10/05/2017, 10:36 AMedwardwongtl
10/06/2017, 3:04 AM.contains()
will check for the equality for all attributes, so you won't match any. You should use
A.forEach { a ->
if (B.any{ it.id == a.id }) {
val index = B.rows.indexOfFirst { it.id == a.id }
B[index] = a
}
}