Package org.xrpl.xrpl4j.model.ledger
Class ImmutableDepositPreAuthObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableDepositPreAuthObject
- All Implemented Interfaces:
DepositPreAuthObject,LedgerObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDepositPreAuthObject
extends Object
implements DepositPreAuthObject
Immutable implementation of
DepositPreAuthObject.
Use the builder to create immutable instances:
ImmutableDepositPreAuthObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDepositPreAuthObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that granted the preauthorization.The account that received the preauthorization.com.google.common.collect.ImmutableList<CredentialWrapper> The credential(s) that received the preauthorization.builder()Creates a builder forImmutableDepositPreAuthObject.copyOf(DepositPreAuthObject instance) Creates an immutable copy of aDepositPreAuthObjectvalue.booleanThis instance is equal to all instances ofImmutableDepositPreAuthObjectthat have equal attribute values.flags()A bit-map of boolean flags.inthashCode()Computes a hash code from attributes:ledgerEntryType,account,authorize,authorizeCredentials,flags,ownerNode,previousTransactionId,previousTransactionLedgerSequence,index.index()The unique ID of theDepositPreAuthObject.The type of ledger object, which will always be "DepositPreauth" in this case.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.toString()Prints the immutable valueDepositPreAuthObjectwith attribute values.withAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.withAuthorize(Optional<? extends Address> optional) Copy the current immutable object by setting an optional value for theauthorizeattribute.withAuthorize(Address value) Copy the current immutable object by setting a present value for the optionalauthorizeattribute.withAuthorizeCredentials(Iterable<? extends CredentialWrapper> elements) Copy the current immutable object with elements that replace the content ofauthorizeCredentials.withAuthorizeCredentials(CredentialWrapper... elements) Copy the current immutable object with elements that replace the content ofauthorizeCredentials.Copy the current immutable object by setting a value for theindexattribute.withOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.withPreviousTransactionId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTransactionIdattribute.withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.
-
Method Details
-
ledgerEntryType
The type of ledger object, which will always be "DepositPreauth" in this case.- Specified by:
ledgerEntryTypein interfaceDepositPreAuthObject- Returns:
- Always
LedgerObject.LedgerEntryType.DEPOSIT_PRE_AUTH.
-
account
The account that granted the preauthorization. (The destination of the preauthorized payments.)- Specified by:
accountin interfaceDepositPreAuthObject- Returns:
- The
Addressof the account.
-
authorize
The account that received the preauthorization. (The sender of the preauthorized payments.)- Specified by:
authorizein interfaceDepositPreAuthObject- Returns:
- The
Addressof the account to authorize.
-
authorizeCredentials
The credential(s) that received the preauthorization.- Specified by:
authorizeCredentialsin interfaceDepositPreAuthObject- Returns:
- A list of
CredentialWrapper.
-
flags
A bit-map of boolean flags. No flags are defined forDepositPreAuthObjects, so this value is always 0.- Specified by:
flagsin interfaceDepositPreAuthObject- 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 interfaceDepositPreAuthObject- Returns:
- A
Stringcontaining the owner node hint.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceDepositPreAuthObject- 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 interfaceDepositPreAuthObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
index
The unique ID of theDepositPreAuthObject.- Specified by:
indexin interfaceDepositPreAuthObject- Returns:
- A
Hash256containing the ID.
-
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
-
withAuthorize
Copy the current immutable object by setting a present value for the optionalauthorizeattribute.- Parameters:
value- The value for authorize- Returns:
- A modified copy of
thisobject
-
withAuthorize
Copy the current immutable object by setting an optional value for theauthorizeattribute. 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 authorize- Returns:
- A modified copy of
thisobject
-
withAuthorizeCredentials
Copy the current immutable object with elements that replace the content ofauthorizeCredentials.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAuthorizeCredentials
public final ImmutableDepositPreAuthObject withAuthorizeCredentials(Iterable<? extends CredentialWrapper> elements) Copy the current immutable object with elements that replace the content ofauthorizeCredentials. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of authorizeCredentials elements to set- 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
-
withPreviousTransactionId
Copy the current immutable object by setting a value for thepreviousTransactionIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionId- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionLedgerSequence
public final ImmutableDepositPreAuthObject 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
-
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 ofImmutableDepositPreAuthObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,account,authorize,authorizeCredentials,flags,ownerNode,previousTransactionId,previousTransactionLedgerSequence,index. -
toString
Prints the immutable valueDepositPreAuthObjectwith attribute values. -
copyOf
Creates an immutable copy of aDepositPreAuthObjectvalue. 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 DepositPreAuthObject instance
-
builder
Creates a builder forImmutableDepositPreAuthObject.ImmutableDepositPreAuthObject.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.authorize(org.xrpl.xrpl4j.model.transactions.Address) // optionalauthorize.addAuthorizeCredentials|addAllAuthorizeCredentials(org.xrpl.xrpl4j.model.transactions.CredentialWrapper) //authorizeCredentialselements .ownerNode(String) // requiredownerNode.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableDepositPreAuthObject builder
-