FungibleState
Keywords: net.corda.core.contracts.FungibleState interface
Date: 2023-09-18

net.corda.core.contracts

## Interface FungibleState<T>

- Type Parameters:
    `T` -

    a type that represents the fungible thing in question. This should describe the basic type of the asset (GBP, USD, oil, shares in company , etc.) and any additional metadata (issuer, grade, class, etc.). An upper-bound is not specified for T to ensure flexibility. Typically, a class would be provided that implements `interface TokenizableAssetInfo`.

  All Superinterfaces:
    ContractState
  All Known Subinterfaces:
    FungibleAsset<T>
  All Known Implementing Classes:
    Obligation.State, Cash.State

      public FungibleState<T>
      extends ContractState

  Interface to represent things which are fungible, this means that there is an expectation that these things can be split and merged. That's the only assumption made by this interface.

  This interface has been defined in addition to `interface FungibleAsset` to provide some additional flexibility which `interface FungibleAsset` lacks, in particular:

  - `interface FungibleAsset` defines an amount property of type Amount, therefore there is an assumption that all fungible things are issued by a single well known party but this is not always the case. For example, crypto-currencies like Bitcoin are generated periodically by a pool of pseudo-anonymous miners and Corda can support such crypto-currencies.

  - `interface FungibleAsset` implements `interface OwnableState`, as such there is an assumption that all fungible things are ownable. This is not always true as fungible derivative contracts exist, for example.

  The expectation is that this interface should be combined with the other core state interfaces such as `interface OwnableState` and others created at the application layer.

  See Also:
    `interface FungibleAsset`, `interface FungibleAsset`, `interface FungibleAsset`, `interface FungibleAsset`, `interface OwnableState`, `interface OwnableState`

- - ### Constructor Detail

    - #### FungibleState

          public FungibleState()

  - ### Method Detail

    - #### getAmount

          @NotNull
          Amount<T> getAmount()

      Amount represents a positive quantity of some token which can be cash, tokens, stock, agreements, or generally anything else that's quantifiable with integer quantities. See `class Amount` for more details.

      See Also:
        `class Amount`