com.r3corda.core.contracts / TransactionForContract / InOutGroup / <init>

# <init>

`InOutGroup(inputs: List<T>, outputs: List<T>, groupingKey: K)`

A set of related inputs and outputs that are connected by some common attributes. An InOutGroup is calculated using groupStates and is useful for handling cases where a transaction may contain similar but unrelated state evolutions, for example, a transaction that moves cash in two different currencies. The numbers must add up on both sides of the transaction, but the values must be summed independently per currency. Grouping can be used to simplify this logic.