https://kotlinlang.org logo
Title
l

lovis

01/09/2018, 2:46 PM
if you still want to keep the interface, just put a default inside the interface. like this
interface BootstrapListener {
    fun onBootstrapComplete()
    
    object DoNothing : BootstrapListener {
        override fun onBootstrapComplete() {}
    }
}

class PlayoutSocketClient(..., private val bootstrapListener: BootstrapListener = BootstrapListener.DoNothing)
k

kingsley

01/09/2018, 3:14 PM
You could instead, just do this:
interface BootstrapListener {

  fun onBootstrapComplete() = Unit
  fun someOtherMethod() = Unit
}