Koltin, Sealed Classes In Kotlin, Android.
for Sealed Classes Modeling Result States (Network Calls, Database Operations): sealed class NetworkResponse<T> { data class Success<T>(val data: T) : NetworkResponse<T>() data class Error(val exception: Exception) : NetworkResponse<T>() } Representing View Events (User Interactions): sealed class