voddan
06/07/2017, 12:19 PM@suppress("UNCHECKED_CAST")
one would write @suppress(Warnings.UNCHECKED_CAST)
. Apart from eliminating typing errors, it would greatly help with discoverability.kirillrakhman
06/07/2017, 12:20 PM@Supress
annotationskirillrakhman
06/07/2017, 12:20 PMmg6maciej
06/07/2017, 12:21 PMkirillrakhman
06/07/2017, 12:21 PMvoddan
06/07/2017, 12:23 PMvoddan
06/07/2017, 12:24 PMThis cast can never succeed
is kinda strangekirillrakhman
06/07/2017, 12:24 PMgrafik.png▾
voddan
06/07/2017, 12:27 PMno one cares
tag 😄kirillrakhman
06/07/2017, 12:28 PMenleur
06/07/2017, 12:39 PMmg6maciej
06/07/2017, 12:41 PMilya.gorbunov
06/07/2017, 12:51 PMthomasnield
06/08/2017, 2:04 AMjava.time.*
package in Java 8 some syntactic sugar?thomasnield
06/08/2017, 2:04 AMval janDays = LocalDate.of(2017,1,1)..LocalDate.of(2017,1,31)
jw
06/11/2017, 2:52 AMjw
06/11/2017, 2:52 AMjw
06/11/2017, 2:53 AMdistinct()
, but no one-liner for the oppositejw
06/11/2017, 2:54 AMduplicates()
then, maybe?jw
06/11/2017, 2:56 AMilya.gorbunov
06/11/2017, 3:32 AMval list = listOf(1, 2, 3, 4, 6, 2)
val hasDuplicates = mutableSetOf<Int>().let { uniques -> list.any { uniques.add(it).not() } }
jw
06/11/2017, 3:33 AMjw
06/11/2017, 3:34 AMval mutableSelf = toMutableList()
toSet().forEach { mutableSelf.remove(it) }
return mutableSelf.toSet()
ilya.gorbunov
06/11/2017, 3:35 AMlist.groupingBy { it }.eachCount().filter { it.value > 1 }.keys
jw
06/11/2017, 3:36 AMjw
06/11/2017, 3:37 AMjw
06/11/2017, 3:38 AMjw
06/11/2017, 3:39 AMjw
06/11/2017, 3:39 AMeachCount()
makes the mapilya.gorbunov
06/11/2017, 3:40 AM