com.r3corda.contracts.clause / NetClause

# NetClause

`open class NetClause<C : CommandData, P> : Clause<ContractState, C, Unit>`

Clause for netting contract states. Currently only supports obligation contract.

### Constructors

<init> | `NetClause()` Clause for netting contract states. Currently only supports obligation contract.

### Properties

requiredCommands | `open val requiredCommands: Set<Class<out CommandData>>` Determine whether this clause runs or not

### Functions

verify | `open fun verify(tx: TransactionForContract, inputs: List<ContractState>, outputs: List<ContractState>, commands: List<AuthenticatedObject<C>>, groupingKey: Unit?): Set<C>` Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched.
verifyNetCommand | `fun verifyNetCommand(inputs: List<State<P>>, outputs: List<State<P>>, command: AuthenticatedObject<NetCommand>, netState: NetState<P>): Unit` Verify a netting command. This handles both close-out and payment netting.

### Extension Functions

matches | `fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): Boolean` Determine if the given list of commands matches the required commands for a clause to trigger.

### Inheritors

Net | `class Net<C : CommandData, P> : NetClause<C, P>` Clause for supporting netting of obligations.