Code Example:
import java.util.UUID
interface InterfaceOne<AType> {
var abcOne:AType
}
interface InterfaceTwo<AType> {
var abcTwo:AType
}
class Example<AType>: InterfaceOne<AType>, InterfaceTwo<AType> {
override var abcOne: AType // Looking for default value to not from constructor
set(value) {
field = value
//...
}
override var abcTwo: AType // Looking for default value to not from constructor
set(value) {
field = value
//...
}
fun test(uuid: AType) {
abcTwo = uuid
abcOne = default // I'm looking for C#'s default keyword equivalent in here
}
}
fun main() {
val uuid = UUID.randomUUID()
val uuid2 = UUID.randomUUID()
val interfaceOne = Example<UUID>()
interfaceOne.test(uuid)
}
You can use my playground for your testing! Click here.