rook
10/16/2017, 9:17 PM// original class in java
class SomeClass {
SomeClass(Mandatory mandatoryThing) {}
SomeClass(Mandatory mandatoryThing, Important importantThing) {}
SomeClass(Mandatory mandatoryThing, Important importantThing, Optional optionalThing) {}
}
// extending the class in kotlin
class CustomClass : SomeClass {
constructor(mandatoryThing: Mandatory) : super(mandatoryThing)
constructor(mandatoryThing: Mandatory, importantThing: Important) : super(mandatoryThing, importantThing)
constructor(mandatoryThing: Mandatory, importantThing: Important, optionalThing: Optional) : super(mandatoryThing, importantThing, optionalThing)
init {
//can't do this since I can't use importantThing
}
}