corda / net.corda.finance.contracts.utils / kotlin.collections.Iterable / sumCashBy

sumCashBy

fun Iterable<ContractState>.sumCashBy(owner: AbstractParty): Amount<Issued<Currency>>

Sums the cash states in the list belonging to a single owner, throwing an exception if there are none, or if any of the cash states cannot be added together (i.e. are different currencies or issuers).