mplacona
07/17/2017, 10:21 PMconstructor
. I wanted to have something like this:
constructor(numLines: Int, bus: String) : this(numLines)
constructor(numLines: Int, device: I2cDevice) : this(numLines)
So you can use the first constructor if you're not passing a device, and the second if you are. The first constructor would then just create a device and handover to the second passing the device it created. Is that a common pattern when using `constructor`s in Kotlin?