Turn output classes into Kotlin data classes

This commit is contained in:
Torsten Grote
2018-08-31 12:48:06 -03:00
parent 138e520e6c
commit 9e7a387ea4
5 changed files with 85 additions and 67 deletions

View File

@@ -4,11 +4,14 @@ import org.briarproject.bramble.api.identity.Author
import javax.annotation.concurrent.Immutable
@Immutable
@Suppress("unused")
class OutputAuthor(author: Author) {
val id: ByteArray = author.id.bytes
val name: String = author.name
val publicKey: ByteArray = author.publicKey
data class OutputAuthor(
val id: ByteArray,
val name: String,
val publicKey: ByteArray
) {
constructor(author: Author) : this(
id = author.id.bytes,
name = author.name,
publicKey = author.publicKey
)
}