Kotlin
sealed class Entity{ object NotFound(): Entity() data class Found(val count:Int): Entity() }
Java
//Appel à objet new Entity.NotFound() //Appel à la classe de données new Entity.Found(1)
Recommended Posts