Kotlin
sealed class Entity{ object NotFound(): Entity() data class Found(val count:Int): Entity() }
Java
//Call to object new Entity.NotFound() //call to data class new Entity.Found(1)
Recommended Posts