sealed class Genre{ sealed class Fiction : Genre(){ object Classics: Fiction() object Fantasy: Fiction() object ScienceFiction: Fiction() } sealed class NonFiction: Genre(){ object Biography: NonFiction() object Business: NonFiction() object Feminism: NonFiction() object Politics: NonFiction() object SelfHelp: NonFiction() } override fun toString(): String { return this::javaClass.get().simpleName }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)