Package org.xrpl.xrpl4j.model.ledger
Class ImmutablePermissionedDomainObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutablePermissionedDomainObject
- All Implemented Interfaces:
LedgerObject,PermissionedDomainObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutablePermissionedDomainObject
extends Object
implements PermissionedDomainObject
Immutable implementation of
PermissionedDomainObject.
Use the builder to create immutable instances:
ImmutablePermissionedDomainObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePermissionedDomainObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<CredentialWrapper> The credentials that are accepted by the domain.builder()Creates a builder forImmutablePermissionedDomainObject.copyOf(PermissionedDomainObject instance) Creates an immutable copy of aPermissionedDomainObjectvalue.booleanThis instance is equal to all instances ofImmutablePermissionedDomainObjectthat have equal attribute values.flags()A bit-map of boolean flags.inthashCode()Computes a hash code from attributes:ledgerEntryType,flags,owner,ownerNode,sequence,acceptedCredentials,previousTxnId,previousTransactionLedgerSequence,index.index()The unique ID of thePermissionedDomainObject.Indicates that this object is aPermissionedDomainObjectobject.owner()The account that controls the settings of the domain.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.com.google.common.primitives.UnsignedIntegersequence()The Sequence value of thePermissionedDomainSettransaction that created this domain.toString()Prints the immutable valuePermissionedDomainObjectwith attribute values.withAcceptedCredentials(Iterable<? extends CredentialWrapper> elements) Copy the current immutable object with elements that replace the content ofacceptedCredentials.withAcceptedCredentials(CredentialWrapper... elements) Copy the current immutable object with elements that replace the content ofacceptedCredentials.Copy the current immutable object by setting a value for theindexattribute.Copy the current immutable object by setting a value for theownerattribute.withOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.withPreviousTxnId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTxnIdattribute.withSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thesequenceattribute.
-
Method Details
-
ledgerEntryType
Indicates that this object is aPermissionedDomainObjectobject.- Specified by:
ledgerEntryTypein interfacePermissionedDomainObject- Returns:
- Always
LedgerObject.LedgerEntryType.PERMISSIONED_DOMAIN.
-
flags
A bit-map of boolean flags. No flags are defined forPermissionedDomainObject, so this value is always 0.- Specified by:
flagsin interfacePermissionedDomainObject- Returns:
- Always
Flags.UNSET.
-
owner
The account that controls the settings of the domain.- Specified by:
ownerin interfacePermissionedDomainObject- Returns:
- The
Addressof the domain owner.
-
ownerNode
A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.- Specified by:
ownerNodein interfacePermissionedDomainObject- Returns:
- A
Stringcontaining the owner node hint.
-
sequence
public com.google.common.primitives.UnsignedInteger sequence()The Sequence value of thePermissionedDomainSettransaction that created this domain. Used in combination with thePermissionedDomainObject.owner()to identify this domain.- Specified by:
sequencein interfacePermissionedDomainObject- Returns:
- An
UnsignedInteger.
-
acceptedCredentials
The credentials that are accepted by the domain. Ownership of one of these credentials automatically makes you a member of the domain.- Specified by:
acceptedCredentialsin interfacePermissionedDomainObject- Returns:
- A list of
CredentialWrapper.
-
previousTxnId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTxnIdin interfacePermissionedDomainObject- 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 interfacePermissionedDomainObject- Returns:
- A
UnsignedIntegerrepresenting the previous transaction sequence.
-
index
The unique ID of thePermissionedDomainObject.- Specified by:
indexin interfacePermissionedDomainObject- Returns:
- A
Hash256.
-
withOwner
Copy the current immutable object by setting a value for theownerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for owner- Returns:
- A modified copy of the
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
-
withSequence
public final ImmutablePermissionedDomainObject withSequence(com.google.common.primitives.UnsignedInteger value) 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
-
withAcceptedCredentials
public final ImmutablePermissionedDomainObject withAcceptedCredentials(CredentialWrapper... elements) Copy the current immutable object with elements that replace the content ofacceptedCredentials.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAcceptedCredentials
public final ImmutablePermissionedDomainObject withAcceptedCredentials(Iterable<? extends CredentialWrapper> elements) Copy the current immutable object with elements that replace the content ofacceptedCredentials. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of acceptedCredentials elements to set- Returns:
- A modified copy of
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 ImmutablePermissionedDomainObject 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 ofImmutablePermissionedDomainObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,flags,owner,ownerNode,sequence,acceptedCredentials,previousTxnId,previousTransactionLedgerSequence,index. -
toString
Prints the immutable valuePermissionedDomainObjectwith attribute values. -
copyOf
Creates an immutable copy of aPermissionedDomainObjectvalue. 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 PermissionedDomainObject instance
-
builder
Creates a builder forImmutablePermissionedDomainObject.ImmutablePermissionedDomainObject.builder() .owner(org.xrpl.xrpl4j.model.transactions.Address) // requiredowner.ownerNode(String) // requiredownerNode.sequence(com.google.common.primitives.UnsignedInteger) // requiredsequence.addAcceptedCredentials|addAllAcceptedCredentials(org.xrpl.xrpl4j.model.transactions.CredentialWrapper) //acceptedCredentialselements .previousTxnId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTxnId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutablePermissionedDomainObject builder
-