Fix indentation of Kotlin datamapping examples (#5563)

* Add Kotlin data mapping examples (BAEL-2247)

* Fix indentation in Kotlin datamapping examples
This commit is contained in:
Kevin Wittek
2018-10-29 16:02:38 +01:00
committed by Eugen
parent 758648eb05
commit 018e00c804
4 changed files with 26 additions and 26 deletions
@@ -1,10 +1,10 @@
package com.baeldung.datamapping
data class User(
val firstName: String,
val lastName: String,
val street: String,
val houseNumber: String,
val phone: String,
val age: Int,
val password: String)
val firstName: String,
val lastName: String,
val street: String,
val houseNumber: String,
val phone: String,
val age: Int,
val password: String)
@@ -3,10 +3,10 @@ package com.baeldung.datamapping
import kotlin.reflect.full.memberProperties
fun User.toUserView() = UserView(
name = "$firstName $lastName",
address = "$street $houseNumber",
telephone = phone,
age = age
name = "$firstName $lastName",
address = "$street $houseNumber",
telephone = phone,
age = age
)
fun User.toUserViewReflection() = with(::UserView) {
@@ -1,8 +1,8 @@
package com.baeldung.datamapping
data class UserView(
val name: String,
val address: String,
val telephone: String,
val age: Int
val name: String,
val address: String,
val telephone: String,
val age: Int
)