public static class Cash.State implements FungibleAsset<T>, QueryableState
A state representing a cash claim against some party.
Constructor and Description |
---|
State(Amount<net.corda.core.contracts.Issued> amount,
AbstractParty owner)
A state representing a cash claim against some party.
|
State(PartyAndReference deposit,
Amount<java.util.Currency> amount,
AbstractParty owner) |
Modifier and Type | Method and Description |
---|---|
Amount<net.corda.core.contracts.Issued> |
component1()
Amount represents a positive quantity of some issued product which can be cash,
|
AbstractParty |
component2()
There must be a MoveCommand signed by this key to claim the amount.
|
Cash.State |
copy(Amount<net.corda.core.contracts.Issued> amount,
AbstractParty owner)
A state representing a cash claim against some party.
|
boolean |
equals(java.lang.Object p) |
PersistentState |
generateMappedObject(MappedSchema schema)
Object Relational Mapping support.
|
Amount<net.corda.core.contracts.Issued> |
getAmount()
Amount represents a positive quantity of some issued product which can be cash,
|
NonExistentClass |
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.
|
AbstractParty |
getOwner()
There must be a MoveCommand signed by this key to claim the amount.
|
NonExistentClass |
getParticipants()
A participant is any party that should be notified when the state is created or consumed.
|
int |
hashCode() |
Cash.State |
issuedBy(AbstractParty party) |
Cash.State |
issuedBy(PartyAndReference deposit) |
Cash.State |
ownedBy(AbstractParty owner) |
java.lang.Iterable<net.corda.core.schemas.MappedSchema> |
supportedSchemas()
Object Relational Mapping support.
|
java.lang.String |
toString() |
Cash.State |
withDeposit(PartyAndReference deposit) |
CommandAndState |
withNewOwner(AbstractParty newOwner)
Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone.
|
FungibleAsset<java.util.Currency> |
withNewOwnerAndAmount(Amount<net.corda.core.contracts.Issued> newAmount,
AbstractParty newOwner)
Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the
rest (exitKeys) alone.
|
getAmount, getExitKeys, withNewOwnerAndAmount
getAmount
getOwner, withNewOwner
getParticipants
generateMappedObject, supportedSchemas
public State(Amount<net.corda.core.contracts.Issued> amount, 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(PartyAndReference deposit, Amount<java.util.Currency> amount, AbstractParty owner)
public NonExistentClass 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.
public NonExistentClass 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.
public FungibleAsset<java.util.Currency> withNewOwnerAndAmount(Amount<net.corda.core.contracts.Issued> newAmount, AbstractParty newOwner)
Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone.
public java.lang.String toString()
public CommandAndState withNewOwner(AbstractParty newOwner)
Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone.
public Cash.State ownedBy(AbstractParty owner)
public Cash.State issuedBy(AbstractParty party)
public Cash.State issuedBy(PartyAndReference deposit)
public Cash.State withDeposit(PartyAndReference deposit)
public PersistentState generateMappedObject(MappedSchema schema)
Object Relational Mapping support.
public java.lang.Iterable<net.corda.core.schemas.MappedSchema> supportedSchemas()
Object Relational Mapping support.
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
public AbstractParty getOwner()
There must be a MoveCommand signed by this key to claim the amount.
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
public AbstractParty component2()
There must be a MoveCommand signed by this key to claim the amount.
public Cash.State copy(Amount<net.corda.core.contracts.Issued> amount, AbstractParty owner)
A state representing a cash claim against some party.
public int hashCode()
public boolean equals(java.lang.Object p)