corda / net.corda.core.contracts / Amount / sumOrThrow

sumOrThrow

@JvmStatic fun <T : Any> Iterable<Amount<T>>.sumOrThrow(): Amount<T>

Sums the amounts yielded by the given iterable, throwing an IllegalArgumentException if any of the token types are mismatched.