https://kotlinlang.org logo
d

dstarcev

07/29/2016, 8:24 AM
I’ve found a solution
Copy code
interface PropertyDetailsProvider {
  fun getPropertyDetails(query: String): PropertyDetails
}

interface PropertyDetails {
  class Found(val address: String, val price: Double, val photos: List<String>): PropertyDetails
  
  class NotFound : PropertyDetails
}
it’s okay as I don’t really need getHashCode(), equals() etc to be implemented