Aslam Hossin
06/01/2020, 1:59 AMval list: List<Any>
How to check its type by the condition ?
when(lists){
is List<Cat> -> {
}
is List<Dog> -> {
}
}
}
Is there any way of doing this stuff? Thanks in advance.Jakub Pi
06/01/2020, 2:40 AMJakub Pi
06/01/2020, 3:45 AMDico
06/01/2020, 9:08 AMsealed class AnimalList<T>(val list: List<T>) {
class Dog(list) : AnimalList<Dog>()
... more
}
Then apply when expression to it