0
votes

What is difference between [Party] and [Party?] in accounts?

Here is the link about accounts: https://github.com/corda/accounts/tree/release/pre/1/v4

Can I convert an object of [Party?] to [Party]?

1

1 Answers

0
votes

[Party?] means the object can be null or a [Party] class object. It is the Kotlin way to indicate the object can be null or a specific object.

In the code:

// Returns the Party which hosts the account specified by account ID.
    fun hostForAccount(accountId: UUID): Party?

This basically means the return type can be null or [Party] object.

PS: [Party] is Corda class