Hello,
I need to use a union type:
class union_type{
//either string, int, double or boolean
}
Is there a way in kotlin to do this?
Hello,
I need to use a union type:
class union_type{
//either string, int, double or boolean
}
Is there a way in kotlin to do this?
You can have a sealed class with an implementation for each type you need.