net.corda.core.contracts.clauses / FilterOn

# FilterOn

`class FilterOn<S : ContractState, C : CommandData, K : Any> : Clause<ContractState, C, K>`

Filter the states that are passed through to the wrapped clause, to restrict them to a specific type.

### Constructors

<init> | `FilterOn(clause: Clause<S, C, K>, filterStates: (List<ContractState>) -> List<S>)` Filter the states that are passed through to the wrapped clause, to restrict them to a specific type.

### Properties

clause | `val clause: Clause<S, C, K>`
filterStates | `val filterStates: (List<ContractState>) -> List<S>`
requiredCommands | `val requiredCommands: Set<Class<out CommandData>>` Determine whether this clause runs or not

### Functions

getExecutionPath | `fun getExecutionPath(commands: List<AuthenticatedObject<C>>): List<Clause<*, *, *>>` Determine the subclauses which will be verified as a result of verifying this clause.
verify | `fun verify(tx: TransactionForContract, inputs: List<ContractState>, outputs: List<ContractState>, commands: List<AuthenticatedObject<C>>, groupingKey: K?): 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.

### 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.