P
- the product the obligation is for payment of.
public static class Obligation.State<P> implements FungibleAsset<T>, NettableState<N,T>
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.
public State(@NotNull net.corda.finance.contracts.asset.Obligation.Lifecycle lifecycle, @NotNull AbstractParty obligor, @NotNull net.corda.finance.contracts.asset.Obligation.Terms<P> template, long quantity, @NotNull AbstractParty beneficiary)
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.
obligor
- Where the debt originates from (obligor)beneficiary
- The public key of the entity the contract pays to@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 generally
anything else that's quantifiable with integer quantities. See class Issued
and class Amount
for more details.
class Issued
,
class Amount
@NotNull public java.util.Collection<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.time.Instant getDueBefore()
@NotNull public java.util.List<net.corda.core.identity.AbstractParty> getParticipants()
@NotNull public AbstractParty getOwner()
There must be a MoveCommand signed by this key to claim the amount.
@NotNull public net.corda.finance.contracts.asset.Obligation.State<P> 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 BilateralNetState<P> getBilateralNetState()
Returns an object used to determine if two states can be subject to close-out netting. If two states return equal objects, they can be close out netted together.
@NotNull public MultilateralNetState<P> getMultilateralNetState()
Returns an object used to determine if two states can be subject to close-out netting. If two states return equal objects, they can be close out netted together.
@NotNull public net.corda.finance.contracts.asset.Obligation.State<P> net(@NotNull net.corda.finance.contracts.asset.Obligation.State<P> other)
Perform bilateral netting of this state with another state. The two states must be compatible (as in bilateralNetState objects are equal).
@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.Obligation.Lifecycle getLifecycle()
public void setLifecycle(@NotNull net.corda.finance.contracts.asset.Obligation.Lifecycle p)
@NotNull public AbstractParty getObligor()
Where the debt originates from
(obligor)
@NotNull public net.corda.finance.contracts.asset.Obligation.Terms<P> getTemplate()
public long getQuantity()
@NotNull public AbstractParty getBeneficiary()
The public key of the entity the contract pays to
@NotNull public net.corda.finance.contracts.asset.Obligation.Lifecycle component1()
@NotNull public AbstractParty component2()
Where the debt originates from
(obligor)
@NotNull public net.corda.finance.contracts.asset.Obligation.Terms<P> component3()
public long component4()
@NotNull public AbstractParty component5()
The public key of the entity the contract pays to
@NotNull public net.corda.finance.contracts.asset.Obligation.State<P> copy(@NotNull net.corda.finance.contracts.asset.Obligation.Lifecycle lifecycle, @NotNull AbstractParty obligor, @NotNull net.corda.finance.contracts.asset.Obligation.Terms<P> template, long quantity, @NotNull AbstractParty beneficiary)
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.
public int hashCode()
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.
public boolean equals(@Nullable java.lang.Object p)
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.