Package org.xrpl.xrpl4j.model.ledger
Class ImmutableDelegateObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableDelegateObject
- All Implemented Interfaces:
DelegateObject,LedgerObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDelegateObject
extends Object
implements DelegateObject
Immutable implementation of
DelegateObject.
Use the builder to create immutable instances:
ImmutableDelegateObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDelegateObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that wants to authorize another account.The authorized account.builder()Creates a builder forImmutableDelegateObject.static ImmutableDelegateObjectcopyOf(DelegateObject instance) Creates an immutable copy of aDelegateObjectvalue.booleanThis instance is equal to all instances ofImmutableDelegateObjectthat have equal attribute values.flags()A bit-map of boolean flags.inthashCode()Computes a hash code from attributes:ledgerEntryType,account,authorize,permissions,ownerNode,flags,previousTransactionId,previousTransactionLedgerSequence,index.index()The unique ID of theDelegateObject.The type of ledger object, which will always be "Delegate" 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.com.google.common.collect.ImmutableList<PermissionWrapper> The transaction permissions that the account has access to.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 valueDelegateObjectwith attribute values.final ImmutableDelegateObjectwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableDelegateObjectwithAuthorize(Address value) Copy the current immutable object by setting a value for theauthorizeattribute.final ImmutableDelegateObjectCopy the current immutable object by setting a value for theindexattribute.final ImmutableDelegateObjectwithOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.final ImmutableDelegateObjectwithPermissions(Iterable<? extends PermissionWrapper> elements) Copy the current immutable object with elements that replace the content ofpermissions.final ImmutableDelegateObjectwithPermissions(PermissionWrapper... elements) Copy the current immutable object with elements that replace the content ofpermissions.final ImmutableDelegateObjectwithPreviousTransactionId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTransactionIdattribute.final ImmutableDelegateObjectwithPreviousTransactionLedgerSequence(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 "Delegate" in this case.- Specified by:
ledgerEntryTypein interfaceDelegateObject- Returns:
- Always
LedgerObject.LedgerEntryType.DELEGATE.
-
account
The account that wants to authorize another account.- Specified by:
accountin interfaceDelegateObject- Returns:
- The
Addressof the account.
-
authorize
The authorized account.- Specified by:
authorizein interfaceDelegateObject- Returns:
- The
Addressof the authorized account.
-
permissions
The transaction permissions that the account has access to.- Specified by:
permissionsin interfaceDelegateObject- Returns:
- A
ListofPermissionWrappers.
-
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 interfaceDelegateObject- Returns:
- A
Stringcontaining the owner node hint.
-
flags
A bit-map of boolean flags. No flags are defined for the Delegate object type, so this value is always 0.- Specified by:
flagsin interfaceDelegateObject- Returns:
- Always
Flags.UNSET.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceDelegateObject- 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 interfaceDelegateObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
index
The unique ID of theDelegateObject.- Specified by:
indexin interfaceDelegateObject- 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 value for theauthorizeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for authorize- Returns:
- A modified copy of the
thisobject
-
withPermissions
Copy the current immutable object with elements that replace the content ofpermissions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPermissions
public final ImmutableDelegateObject withPermissions(Iterable<? extends PermissionWrapper> elements) Copy the current immutable object with elements that replace the content ofpermissions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of permissions 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 ImmutableDelegateObject 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 ofImmutableDelegateObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,account,authorize,permissions,ownerNode,flags,previousTransactionId,previousTransactionLedgerSequence,index. -
toString
Prints the immutable valueDelegateObjectwith attribute values. -
copyOf
Creates an immutable copy of aDelegateObjectvalue. 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 DelegateObject instance
-
builder
Creates a builder forImmutableDelegateObject.ImmutableDelegateObject.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.authorize(org.xrpl.xrpl4j.model.transactions.Address) // requiredauthorize.addPermissions|addAllPermissions(org.xrpl.xrpl4j.model.transactions.PermissionWrapper) //permissionselements .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 ImmutableDelegateObject builder
-