Alexjok
06/21/2019, 7:57 AMfun main() {
val fileList = listOf<FileName>()
}
data class FileName(val code: String, val uid: String, val dateTime: LocalDateTime)
diesieben07
06/21/2019, 8:07 AMdistinctBy
do what you need?
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/distinct-by.htmlAlexjok
06/21/2019, 8:08 AMdiesieben07
06/21/2019, 8:10 AMlist.groupingBy { it.key }
.eachCount()
.filterValues { it > 1 }
.keys
if you need them as a separate collectionAlexjok
06/21/2019, 8:12 AM