ObligationKt
Keywords: net.corda.finance.contracts.asset.ObligationKt class
Date: 2023-09-18

net.corda.finance.contracts.asset

## Class ObligationKt

- net.corda.finance.contracts.asset.ObligationKt

-     public class ObligationKt

- - ### Constructor Detail

    - #### ObligationKt

          public ObligationKt()

  - ### Method Detail

    - #### extractAmountsDue

          @NotNull
          public static <P> java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> extractAmountsDue(@NotNull
                                                                                                                  net.corda.finance.contracts.asset.Obligation.Terms<P> product,
                                                                                                                  @NotNull
                                                                                                                  java.lang.Iterable<net.corda.finance.contracts.asset.Obligation.State> states)

      Convert a list of settlement states into total from each obligor to a beneficiary.

      Returns:
        a map of obligor/beneficiary pairs to the balance due.

    - #### netAmountsDue

          @NotNull
          public static <P extends AbstractParty,T> java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> netAmountsDue(@NotNull
                                                                                                                                      java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)

      Net off the amounts due between parties.

    - #### sumAmountsDue

          @NotNull
          public static <P extends AbstractParty,T> java.util.Map<P,java.lang.Long> sumAmountsDue(@NotNull
                                                                                                           java.util.Map<kotlin.Pair,net.corda.core.contracts.Amount> balances)

      Calculate the total balance movement for each party in the transaction, based off a summary of balances between each obligor and beneficiary.

      Type Parameters:
        `P` -

        type of party to operate on.

        `T` -

        token that balances represent

      Parameters:
        `balances` - payments due, indexed by obligor and beneficiary. Zero balances are stripped from the map before beingreturned.

    - #### at

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> at(@NotNull
                                                                                              net.corda.finance.contracts.asset.Obligation.State<T> $this$at,
                                                                                              @NotNull
                                                                                              java.time.Instant dueBefore)

    - #### between

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> between(@NotNull
                                                                                                   net.corda.finance.contracts.asset.Obligation.State<T> $this$between,
                                                                                                   @NotNull
                                                                                                   kotlin.Pair<? extends net.corda.core.identity.AbstractParty,? extends net.corda.core.identity.AbstractParty> parties)

    - #### owned by

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> owned by(@NotNull
                                                                                                    net.corda.finance.contracts.asset.Obligation.State<T> $this$owned_u20by,
                                                                                                    @NotNull
                                                                                                    AbstractParty owner)

    - #### issued by

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> issued by(@NotNull
                                                                                                     net.corda.finance.contracts.asset.Obligation.State<T> $this$issued_u20by,
                                                                                                     @NotNull
                                                                                                     AbstractParty party)

    - #### ownedBy

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> ownedBy(@NotNull
                                                                                                   net.corda.finance.contracts.asset.Obligation.State<T> $this$ownedBy,
                                                                                                   @NotNull
                                                                                                   AbstractParty owner)

    - #### issuedBy

          @NotNull
          public static <T> net.corda.finance.contracts.asset.Obligation.State<T> issuedBy(@NotNull
                                                                                                    net.corda.finance.contracts.asset.Obligation.State<T> $this$issuedBy,
                                                                                                    @NotNull
                                                                                                    AnonymousParty party)