net.corda.core.contracts

## Class ContractsDSL

- net.corda.core.contracts.ContractsDSL

-     public class ContractsDSL

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.Currency` | `CHF`
    `static java.util.Currency` | `EUR`
    `static Commodity` | `FCOJ`
    `static java.util.Currency` | `GBP`
    `static java.util.Currency` | `USD`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Amount<java.util.Currency>` | `DOLLARS(int amount)`
    `static Amount<java.util.Currency>` | `DOLLARS(double amount)`
    `static Amount<net.corda.core.contracts.Commodity>` | `FCOJ(int amount)`
    `static Amount<java.util.Currency>` | `POUNDS(int amount)`
    `static Amount<java.util.Currency>` | `SWISS_FRANCS(int amount)`
    `static Commodity` | `commodity(java.lang.String code)`
    `static java.util.Currency` | `currency(java.lang.String code)` Defines a simple domain specific language for the specification of financial contracts. Currently covers:
    `static Amount<java.util.Currency>` | `getDOLLARS(int $receiver)`
    `static Amount<java.util.Currency>` | `getDOLLARS(double $receiver)`
    `static Amount<net.corda.core.contracts.Commodity>` | `getFCOJ(int $receiver)`
    `static Amount<java.util.Currency>` | `getPOUNDS(int $receiver)`
    `static Amount<java.util.Currency>` | `getSWISS_FRANCS(int $receiver)`
    `static Issued<java.util.Currency>` | `issued by(java.util.Currency $receiver, PartyAndReference deposit)`
    `static Issued<net.corda.core.contracts.Commodity>` | `issued by(Commodity $receiver, PartyAndReference deposit)`
    `static Amount<net.corda.core.contracts.Issued>` | `issued by(Amount<java.util.Currency> $receiver, PartyAndReference deposit)`
    `static Issued<java.util.Currency>` | `issuedBy(java.util.Currency $receiver, PartyAndReference deposit)`
    `static Issued<net.corda.core.contracts.Commodity>` | `issuedBy(Commodity $receiver, PartyAndReference deposit)`
    `static Amount<net.corda.core.contracts.Issued>` | `issuedBy(Amount<java.util.Currency> $receiver, PartyAndReference deposit)`
    `static <C extends CommandData> AuthenticatedObject<C>` | `requireSingleCommand(java.util.Collection<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> $receiver, java.lang.Class<C> klass)`
    `static <R> R` | `requireThat(kotlin.jvm.functions.Function1<? super net.corda.core.contracts.Requirements,? extends R> body)`

- - ### Field Detail

    - #### USD

          public static java.util.Currency USD

    - #### GBP

          public static java.util.Currency GBP

    - #### EUR

          public static java.util.Currency EUR

    - #### CHF

          public static java.util.Currency CHF

    - #### FCOJ

          public static Commodity FCOJ

  - ### Method Detail

    - #### currency

          public static java.util.Currency currency(java.lang.String code)

      Defines a simple domain specific language for the specification of financial contracts. Currently covers:

      - Some utilities for working with commands.

      - Code for working with currencies.

      - An Amount type that represents a positive quantity of a specific currency.

      - A simple language extension for specifying requirements in English, along with logic to enforce them.

      TODO: Look into replacing Currency and Amount with CurrencyUnit and MonetaryAmount from the javax.money API (JSR 354)

    - #### commodity

          public static Commodity commodity(java.lang.String code)

    - #### DOLLARS

          public static Amount<java.util.Currency> DOLLARS(int amount)

    - #### DOLLARS

          public static Amount<java.util.Currency> DOLLARS(double amount)

    - #### POUNDS

          public static Amount<java.util.Currency> POUNDS(int amount)

    - #### SWISS_FRANCS

          public static Amount<java.util.Currency> SWISS_FRANCS(int amount)

    - #### FCOJ

          public static Amount<net.corda.core.contracts.Commodity> FCOJ(int amount)

    - #### getDOLLARS

          public static Amount<java.util.Currency> getDOLLARS(int $receiver)

    - #### getDOLLARS

          public static Amount<java.util.Currency> getDOLLARS(double $receiver)

    - #### getPOUNDS

          public static Amount<java.util.Currency> getPOUNDS(int $receiver)

    - #### getSWISS_FRANCS

          public static Amount<java.util.Currency> getSWISS_FRANCS(int $receiver)

    - #### getFCOJ

          public static Amount<net.corda.core.contracts.Commodity> getFCOJ(int $receiver)

    - #### issued by

          public static Issued<java.util.Currency> issued by(java.util.Currency $receiver,
                                                             PartyAndReference deposit)

    - #### issued by

          public static Issued<net.corda.core.contracts.Commodity> issued by(Commodity $receiver,
                                                                             PartyAndReference deposit)

    - #### issued by

          public static Amount<net.corda.core.contracts.Issued> issued by(Amount<java.util.Currency> $receiver,
                                                                          PartyAndReference deposit)

    - #### issuedBy

          public static Issued<java.util.Currency> issuedBy(java.util.Currency $receiver,
                                                            PartyAndReference deposit)

    - #### issuedBy

          public static Issued<net.corda.core.contracts.Commodity> issuedBy(Commodity $receiver,
                                                                            PartyAndReference deposit)

    - #### issuedBy

          public static Amount<net.corda.core.contracts.Issued> issuedBy(Amount<java.util.Currency> $receiver,
                                                                         PartyAndReference deposit)

    - #### requireThat

          public static <R> R requireThat(kotlin.jvm.functions.Function1<? super net.corda.core.contracts.Requirements,? extends R> body)

    - #### requireSingleCommand

          public static <C extends CommandData> AuthenticatedObject<C> requireSingleCommand(java.util.Collection<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> $receiver,
                                                                                            java.lang.Class<C> klass)