public static class Cash.State implements FungibleAsset<T>, QueryableState
A state representing a cash claim against some party.
public State(@NotNull Amount<net.corda.core.contracts.Issued> amount, @NotNull AbstractParty owner)
A state representing a cash claim against some party.
amount
- Amount represents a positive quantity of some issued product which can be cash, tokens, assets, or generallyanything else that's quantifiable with integer quantities. See class Issued
and class Amount
for more details.owner
- There must be a MoveCommand signed by this key to claim the amount.public State(@NotNull PartyAndReference deposit, @NotNull Amount<java.util.Currency> amount, @NotNull AbstractParty owner)
@NotNull public java.util.Set<java.security.PublicKey> getExitKeys()
There must be an ExitCommand signed by these keys to destroy the amount. While all states require their owner to sign, some (i.e. cash) also require the issuer.
@NotNull public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
A participant is any party that should be notified when the state is created or consumed.
The list of participants is required for certain types of transactions. For example, when changing the notary for this state, every participant has to be involved and approve the transaction so that they receive the updated state, and don't end up in a situation where they can no longer use a state they possess, since someone consumed that state during the notary change process.
The participants list should normally be derived from the contents of the state.
@NotNull public FungibleAsset<java.util.Currency> withNewOwnerAndAmount(@NotNull Amount<net.corda.core.contracts.Issued> newAmount, @NotNull AbstractParty newOwner)
Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone.
@NotNull public java.lang.String toString()
@NotNull public CommandAndState withNewOwner(@NotNull AbstractParty newOwner)
Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone.
@NotNull public net.corda.finance.contracts.asset.Cash.State ownedBy(@NotNull AbstractParty owner)
@NotNull public net.corda.finance.contracts.asset.Cash.State issuedBy(@NotNull AbstractParty party)
@NotNull public net.corda.finance.contracts.asset.Cash.State issuedBy(@NotNull PartyAndReference deposit)
@NotNull public net.corda.finance.contracts.asset.Cash.State withDeposit(@NotNull PartyAndReference deposit)
@NotNull public PersistentState generateMappedObject(@NotNull MappedSchema schema)
Object Relational Mapping support.
@NotNull public java.lang.Iterable<net.corda.core.schemas.MappedSchema> supportedSchemas()
Object Relational Mapping support.
@NotNull public Amount<net.corda.core.contracts.Issued> getAmount()
Amount represents a positive quantity of some issued product which can be cash,
tokens, assets, or generallyanything else that's quantifiable with integer quantities. See class Issued
and class Amount
for more details.
class Issued
,
class Amount
@NotNull public AbstractParty getOwner()
There must be a MoveCommand signed by this key to claim the amount.
@NotNull public Amount<net.corda.core.contracts.Issued> component1()
Amount represents a positive quantity of some issued product which can be cash,
tokens, assets, or generallyanything else that's quantifiable with integer quantities. See class Issued
and class Amount
for more details.
class Issued
,
class Amount
@NotNull public AbstractParty component2()
There must be a MoveCommand signed by this key to claim the amount.
@NotNull public net.corda.finance.contracts.asset.Cash.State copy(@NotNull Amount<net.corda.core.contracts.Issued> amount, @NotNull AbstractParty owner)
A state representing a cash claim against some party.
public int hashCode()
A state representing a cash claim against some party.
public boolean equals(@Nullable java.lang.Object p)
A state representing a cash claim against some party.