LedgerTransaction.InOutGroup
Keywords: net.corda.core.transactions.LedgerTransaction.InOutGroup class
Date: 2023-09-18

net.corda.core.transactions

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

- net.corda.core.transactions.LedgerTransaction.InOutGroup<T,K>

- Enclosing class:
    LedgerTransaction

      public static class LedgerTransaction.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.

  See Also:
    `groupStates`

- - ### Constructor Detail

    - #### InOutGroup

          public InOutGroup(@NotNull
                            java.util.List<? extends T> inputs,
                            @NotNull
                            java.util.List<? extends T> outputs,
                            @NotNull
                            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.

      See Also:
        `groupStates`

  - ### Method Detail

    - #### getInputs

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

    - #### getOutputs

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

    - #### getGroupingKey

          @NotNull
          public K getGroupingKey()

    - #### component1

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

    - #### component2

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

    - #### component3

          @NotNull
          public K component3()

    - #### copy

          @NotNull
          public net.corda.core.transactions.LedgerTransaction.InOutGroup<T,K> copy(@NotNull
                                                                                             java.util.List<? extends T> inputs,
                                                                                             @NotNull
                                                                                             java.util.List<? extends T> outputs,
                                                                                             @NotNull
                                                                                             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.

      See Also:
        `groupStates`

    - #### toString

          @NotNull
          public java.lang.String toString()

      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.

      See Also:
        `groupStates`

    - #### hashCode

          public int hashCode()

      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.

      See Also:
        `groupStates`

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      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.

      See Also:
        `groupStates`