dmitriy.m
09/26/2016, 11:33 AMdata class UserWrapper(private val user: User, val transactionId: String) {
fun userId(): Long {
return user.userId
}
fun email(): String {
return user.email
}
fun userName(): String {
return user.username
}
}
it’s a simple data class that wraps another one, and to avoiding access to properties multiply times, i decide to use proxy methods, maybe kotlin has more “sugar” way to do it, please help )