net.corda.core.contracts

## Class TransactionForContract.InOutGroup<T extends ContractState,K>

- net.corda.core.contracts.TransactionForContract.InOutGroup<T,K>

- Enclosing class:
    TransactionForContract

      public static class TransactionForContract.InOutGroup<T extends ContractState,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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InOutGroup(java.util.List<? extends T> inputs, java.util.List<? extends T> outputs, K groupingKey)` 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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<T>` | `component1()`
    `java.util.List<T>` | `component2()`
    `K` | `component3()`
    `TransactionForContract.InOutGroup<T,K>` | `copy(java.util.List<? extends T> inputs, java.util.List<? extends T> outputs, K groupingKey)` 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.
    `boolean` | `equals(java.lang.Object p)`
    `K` | `getGroupingKey()`
    `java.util.List<T>` | `getInputs()`
    `java.util.List<T>` | `getOutputs()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

- - ### Constructor Detail

    - #### InOutGroup

          public InOutGroup(java.util.List<? extends T> inputs,
                            java.util.List<? extends T> outputs,
                            K groupingKey)

      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.

  - ### Method Detail

    - #### getInputs

          public java.util.List<T> getInputs()

    - #### getOutputs

          public java.util.List<T> getOutputs()

    - #### getGroupingKey

          public K getGroupingKey()

    - #### component1

          public java.util.List<T> component1()

    - #### component2

          public java.util.List<T> component2()

    - #### component3

          public K component3()

    - #### copy

          public TransactionForContract.InOutGroup<T,K> copy(java.util.List<? extends T> inputs,
                                                             java.util.List<? extends T> outputs,
                                                             K groupingKey)

      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.

    - #### toString

          public java.lang.String toString()

    - #### hashCode

          public int hashCode()

    - #### equals

          public boolean equals(java.lang.Object p)