corda / net.corda.core.transactions / FilteredLeaves / checkWithFun

# checkWithFun

`fun checkWithFun(checkingFun: (Any) -> Boolean): Boolean`

Function that checks the whole filtered structure. Force type checking on a structure that we obtained, so we don't sign more than expected. Example: Oracle is implemented to check only for commands, if it gets an attachment and doesn't expect it - it can sign over a transaction with the attachment that wasn't verified. Of course it depends on how you implement it, but else -> false should solve a problem with possible later extensions to WireTransaction.

### Parameters

`checkingFun` - function that performs type checking on the structure fields and provides verification logic accordingly.

Returns
false if no elements were matched on a structure or checkingFun returned false.