Package org.xrpl.xrpl4j.model.ledger
Class ImmutableCheckObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableCheckObject
- All Implemented Interfaces:
CheckObject,LedgerObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableCheckObject
extends Object
implements CheckObject
Immutable implementation of
CheckObject.
Use the builder to create immutable instances:
ImmutableCheckObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCheckObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The sender of theCheckObject.static ImmutableCheckObject.Builderbuilder()Creates a builder forImmutableCheckObject.static ImmutableCheckObjectcopyOf(CheckObject instance) Creates an immutable copy of aCheckObjectvalue.The intended recipient of theCheckObject.A hint indicating which page of theCheckObject.destination()'s owner directory links to this object, in case the directory consists of multiple pages.Optional<com.google.common.primitives.UnsignedInteger> An arbitrary tag to further specify the destination for thisCheckObject, such as a hosted recipient at the destination address.booleanThis instance is equal to all instances ofImmutableCheckObjectthat have equal attribute values.Optional<com.google.common.primitives.UnsignedInteger> Indicates the time after which this Check is considered expired, in seconds since the Ripple Epoch.flags()A bit-map of boolean flags.inthashCode()Computes a hash code from attributes:ledgerEntryType,account,sourceTag,destination,destinationTag,flags,ownerNode,previousTxnId,previousTransactionLedgerSequence,sendMax,sequence,destinationNode,expiration,invoiceId,index.index()The unique ID of theCheckObject.Arbitrary 256-bit hash provided by theCheckObject.account()as a specific reason or identifier for thisCheckObject.The value 0x0043, mapped to the string "Check", indicates that this object is aCheckObjectobject.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.The identifying hash of the transaction that most recently modified this object.sendMax()The maximum amount of currency thisCheckObjectcan debit theCheckObject.account().com.google.common.primitives.UnsignedIntegersequence()The sequence number of theCheckCreatetransaction that created this check.Optional<com.google.common.primitives.UnsignedInteger> An arbitrary tag to further specify the source for thisCheckObject, such as a hosted recipient at the sender's address.toString()Prints the immutable valueCheckObjectwith attribute values.final ImmutableCheckObjectwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableCheckObjectwithDestination(Address value) Copy the current immutable object by setting a value for thedestinationattribute.final ImmutableCheckObjectwithDestinationNode(String value) Copy the current immutable object by setting a present value for the optionaldestinationNodeattribute.final ImmutableCheckObjectwithDestinationNode(Optional<String> optional) Copy the current immutable object by setting an optional value for thedestinationNodeattribute.final ImmutableCheckObjectwithDestinationTag(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaldestinationTagattribute.final ImmutableCheckObjectwithDestinationTag(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thedestinationTagattribute.final ImmutableCheckObjectwithExpiration(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalexpirationattribute.final ImmutableCheckObjectwithExpiration(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for theexpirationattribute.final ImmutableCheckObjectCopy the current immutable object by setting a value for theindexattribute.final ImmutableCheckObjectwithInvoiceId(Optional<? extends Hash256> optional) Copy the current immutable object by setting an optional value for theinvoiceIdattribute.final ImmutableCheckObjectwithInvoiceId(Hash256 value) Copy the current immutable object by setting a present value for the optionalinvoiceIdattribute.final ImmutableCheckObjectwithOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.final ImmutableCheckObjectwithPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.final ImmutableCheckObjectwithPreviousTxnId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTxnIdattribute.final ImmutableCheckObjectwithSendMax(CurrencyAmount value) Copy the current immutable object by setting a value for thesendMaxattribute.final ImmutableCheckObjectwithSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thesequenceattribute.final ImmutableCheckObjectwithSourceTag(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalsourceTagattribute.final ImmutableCheckObjectwithSourceTag(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thesourceTagattribute.
-
Method Details
-
ledgerEntryType
The value 0x0043, mapped to the string "Check", indicates that this object is aCheckObjectobject.- Specified by:
ledgerEntryTypein interfaceCheckObject- Returns:
- Always
LedgerObject.LedgerEntryType.CHECK.
-
account
The sender of theCheckObject. Cashing theCheckObjectdebits this address's balance.- Specified by:
accountin interfaceCheckObject- Returns:
- The
Addressof the sender.
-
sourceTag
An arbitrary tag to further specify the source for thisCheckObject, such as a hosted recipient at the sender's address.- Specified by:
sourceTagin interfaceCheckObject- Returns:
- An
Optionalof typeUnsignedInteger.
-
destination
The intended recipient of theCheckObject. Only this address can cash theCheckObject, using aCheckCashtransaction.- Specified by:
destinationin interfaceCheckObject- Returns:
- The
Addressof the destination.
-
destinationTag
An arbitrary tag to further specify the destination for thisCheckObject, such as a hosted recipient at the destination address.- Specified by:
destinationTagin interfaceCheckObject- Returns:
- An
Optionalof typeUnsignedInteger.
-
flags
A bit-map of boolean flags. No flags are defined forCheckObject, so this value is always 0.- Specified by:
flagsin interfaceCheckObject- Returns:
- Always
Flags.UNSET.
-
ownerNode
A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.- Specified by:
ownerNodein interfaceCheckObject- Returns:
- A
Stringcontaining the owner node hint.
-
previousTxnId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTxnIdin interfaceCheckObject- Returns:
- A
Hash256containing the previous transaction hash.
-
previousTransactionLedgerSequence
public com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()The index of the ledger that contains the transaction that most recently modified this object.- Specified by:
previousTransactionLedgerSequencein interfaceCheckObject- Returns:
- A
UnsignedIntegerrepresenting the previous transaction sequence.
-
sendMax
The maximum amount of currency thisCheckObjectcan debit theCheckObject.account(). If theCheckObjectis successfully cashed, theCheckObject.destination()is credited in the same currency for up to this amount.- Specified by:
sendMaxin interfaceCheckObject- Returns:
- A
CurrencyAmount.
-
sequence
public com.google.common.primitives.UnsignedInteger sequence()The sequence number of theCheckCreatetransaction that created this check.- Specified by:
sequencein interfaceCheckObject- Returns:
- An
UnsignedInteger.
-
destinationNode
A hint indicating which page of theCheckObject.destination()'s owner directory links to this object, in case the directory consists of multiple pages.- Specified by:
destinationNodein interfaceCheckObject- Returns:
- An
Optionalof typeString.
-
expiration
Indicates the time after which this Check is considered expired, in seconds since the Ripple Epoch.- Specified by:
expirationin interfaceCheckObject- Returns:
- An
Optionalof typeUnsignedInteger.
-
invoiceId
Arbitrary 256-bit hash provided by theCheckObject.account()as a specific reason or identifier for thisCheckObject.- Specified by:
invoiceIdin interfaceCheckObject- Returns:
- An
Optionalof typeHash256.
-
index
The unique ID of theCheckObject.- Specified by:
indexin interfaceCheckObject- Returns:
- A
Hash256.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
withSourceTag
Copy the current immutable object by setting a present value for the optionalsourceTagattribute.- Parameters:
value- The value for sourceTag- Returns:
- A modified copy of
thisobject
-
withSourceTag
public final ImmutableCheckObject withSourceTag(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thesourceTagattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for sourceTag- Returns:
- A modified copy of
thisobject
-
withDestination
Copy the current immutable object by setting a value for thedestinationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for destination- Returns:
- A modified copy of the
thisobject
-
withDestinationTag
public final ImmutableCheckObject withDestinationTag(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaldestinationTagattribute.- Parameters:
value- The value for destinationTag- Returns:
- A modified copy of
thisobject
-
withDestinationTag
public final ImmutableCheckObject withDestinationTag(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thedestinationTagattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for destinationTag- Returns:
- A modified copy of
thisobject
-
withOwnerNode
Copy the current immutable object by setting a value for theownerNodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ownerNode- Returns:
- A modified copy of the
thisobject
-
withPreviousTxnId
Copy the current immutable object by setting a value for thepreviousTxnIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTxnId- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionLedgerSequence
public final ImmutableCheckObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionLedgerSequence- Returns:
- A modified copy of the
thisobject
-
withSendMax
Copy the current immutable object by setting a value for thesendMaxattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sendMax- Returns:
- A modified copy of the
thisobject
-
withSequence
Copy the current immutable object by setting a value for thesequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sequence- Returns:
- A modified copy of the
thisobject
-
withDestinationNode
Copy the current immutable object by setting a present value for the optionaldestinationNodeattribute.- Parameters:
value- The value for destinationNode- Returns:
- A modified copy of
thisobject
-
withDestinationNode
Copy the current immutable object by setting an optional value for thedestinationNodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for destinationNode- Returns:
- A modified copy of
thisobject
-
withExpiration
public final ImmutableCheckObject withExpiration(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalexpirationattribute.- Parameters:
value- The value for expiration- Returns:
- A modified copy of
thisobject
-
withExpiration
public final ImmutableCheckObject withExpiration(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for theexpirationattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for expiration- Returns:
- A modified copy of
thisobject
-
withInvoiceId
Copy the current immutable object by setting a present value for the optionalinvoiceIdattribute.- Parameters:
value- The value for invoiceId- Returns:
- A modified copy of
thisobject
-
withInvoiceId
Copy the current immutable object by setting an optional value for theinvoiceIdattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for invoiceId- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableCheckObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,account,sourceTag,destination,destinationTag,flags,ownerNode,previousTxnId,previousTransactionLedgerSequence,sendMax,sequence,destinationNode,expiration,invoiceId,index. -
toString
Prints the immutable valueCheckObjectwith attribute values. -
copyOf
Creates an immutable copy of aCheckObjectvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CheckObject instance
-
builder
Creates a builder forImmutableCheckObject.ImmutableCheckObject.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.sourceTag(com.google.common.primitives.UnsignedInteger) // optionalsourceTag.destination(org.xrpl.xrpl4j.model.transactions.Address) // requireddestination.destinationTag(com.google.common.primitives.UnsignedInteger) // optionaldestinationTag.ownerNode(String) // requiredownerNode.previousTxnId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTxnId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.sendMax(org.xrpl.xrpl4j.model.transactions.CurrencyAmount) // requiredsendMax.sequence(com.google.common.primitives.UnsignedInteger) // requiredsequence.destinationNode(String) // optionaldestinationNode.expiration(com.google.common.primitives.UnsignedInteger) // optionalexpiration.invoiceId(org.xrpl.xrpl4j.model.transactions.Hash256) // optionalinvoiceId.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableCheckObject builder
-