LedgerTransaction.commandsOfType - corda

corda / net.corda.core.transactions / LedgerTransaction / commandsOfType

# commandsOfType

`fun <T : CommandData> commandsOfType(clazz: Class<T>): List<Command<T>>`

Helper to simplify getting all Command items with a CommandData of a particular class, interface, or base class.

### Parameters

`clazz` - The class type used for filtering via an Class.isInstance check. clazz must be an extension of CommandData.

Return
the possibly empty list of commands with CommandData values matching the clazz restriction.

`fun <reified T : CommandData> commandsOfType(): List<Command<T>>`