I have this code:
class AnyUsernamePersistentNodePath(override val value: String) : AnyPersistenceNodePath { override val key = "username" }
and
interface AnyPersistenceNodePath { val key: String val value: String }
So far so good. Now I want the value parameter in the constructor to be called username instead of value . But obviously, keep the overriding property of the value interface. Is this possible in Kotlin?
I know what I can do:
class AnyUsernamePersistentNodePath(val username: String) : AnyPersistenceNodePath { override val key = "username" override val value = username }
but I would like to avoid it.
kotlin
Hector
source share