public class CommodityContractKt
Modifier and Type | Method and Description |
---|---|
static CommodityContract |
getCOMMODITY_PROGRAM_ID() |
static Amount<net.corda.core.contracts.Issued> |
sumCommodities(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, throwing an exception if there are none, or if any of the cash
states cannot be added together (i.e. are different currencies).
|
static Amount<net.corda.core.contracts.Issued> |
sumCommoditiesOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, returning null if there are none.
|
static Amount<net.corda.core.contracts.Issued> |
sumCommoditiesOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver,
Issued<net.corda.core.contracts.Commodity> currency)
Sums the cash states in the list, returning zero of the given currency if there are none.
|
public static CommodityContract getCOMMODITY_PROGRAM_ID()
public static Amount<net.corda.core.contracts.Issued> sumCommodities(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, throwing an exception if there are none, or if any of the cash states cannot be added together (i.e. are different currencies).
public static Amount<net.corda.core.contracts.Issued> sumCommoditiesOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, returning null if there are none.
public static Amount<net.corda.core.contracts.Issued> sumCommoditiesOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver, Issued<net.corda.core.contracts.Commodity> currency)
Sums the cash states in the list, returning zero of the given currency if there are none.