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().

  • Method Details

    • ledgerEntryType

      public LedgerObject.LedgerEntryType ledgerEntryType()
      Indicates that this object is a PermissionedDomainObject object.
      Specified by:
      ledgerEntryType in interface PermissionedDomainObject
      Returns:
      Always LedgerObject.LedgerEntryType.PERMISSIONED_DOMAIN.
    • flags

      public Flags flags()
      A bit-map of boolean flags. No flags are defined for PermissionedDomainObject, so this value is always 0.
      Specified by:
      flags in interface PermissionedDomainObject
      Returns:
      Always Flags.UNSET.
    • owner

      public Address owner()
      The account that controls the settings of the domain.
      Specified by:
      owner in interface PermissionedDomainObject
      Returns:
      The Address of the domain owner.
    • ownerNode

      public String 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:
      ownerNode in interface PermissionedDomainObject
      Returns:
      A String containing the owner node hint.
    • sequence

      public com.google.common.primitives.UnsignedInteger sequence()
      The Sequence value of the PermissionedDomainSet transaction that created this domain. Used in combination with the PermissionedDomainObject.owner() to identify this domain.
      Specified by:
      sequence in interface PermissionedDomainObject
      Returns:
      An UnsignedInteger.
    • acceptedCredentials

      public com.google.common.collect.ImmutableList<CredentialWrapper> 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:
      acceptedCredentials in interface PermissionedDomainObject
      Returns:
      A list of CredentialWrapper.
    • previousTxnId

      public Hash256 previousTxnId()
      The identifying hash of the transaction that most recently modified this object.
      Specified by:
      previousTxnId in interface PermissionedDomainObject
      Returns:
      A Hash256 containing 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:
      previousTransactionLedgerSequence in interface PermissionedDomainObject
      Returns:
      A UnsignedInteger representing the previous transaction sequence.
    • index

      public Hash256 index()
      The unique ID of the PermissionedDomainObject.
      Specified by:
      index in interface PermissionedDomainObject
      Returns:
      A Hash256.
    • withOwner

      public final ImmutablePermissionedDomainObject withOwner(Address value)
      Copy the current immutable object by setting a value for the owner attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for owner
      Returns:
      A modified copy of the this object
    • withOwnerNode

      public final ImmutablePermissionedDomainObject withOwnerNode(String value)
      Copy the current immutable object by setting a value for the ownerNode attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ownerNode
      Returns:
      A modified copy of the this object
    • withSequence

      public final ImmutablePermissionedDomainObject withSequence(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the sequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sequence
      Returns:
      A modified copy of the this object
    • withAcceptedCredentials

      public final ImmutablePermissionedDomainObject withAcceptedCredentials(CredentialWrapper... elements)
      Copy the current immutable object with elements that replace the content of acceptedCredentials.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAcceptedCredentials

      public final ImmutablePermissionedDomainObject withAcceptedCredentials(Iterable<? extends CredentialWrapper> elements)
      Copy the current immutable object with elements that replace the content of acceptedCredentials. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of acceptedCredentials elements to set
      Returns:
      A modified copy of this object
    • withPreviousTxnId

      public final ImmutablePermissionedDomainObject withPreviousTxnId(Hash256 value)
      Copy the current immutable object by setting a value for the previousTxnId attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for previousTxnId
      Returns:
      A modified copy of the this object
    • withPreviousTransactionLedgerSequence

      public final ImmutablePermissionedDomainObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the previousTransactionLedgerSequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for previousTransactionLedgerSequence
      Returns:
      A modified copy of the this object
    • withIndex

      public final ImmutablePermissionedDomainObject withIndex(Hash256 value)
      Copy the current immutable object by setting a value for the index attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for index
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePermissionedDomainObject that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: ledgerEntryType, flags, owner, ownerNode, sequence, acceptedCredentials, previousTxnId, previousTransactionLedgerSequence, index.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value PermissionedDomainObject with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a PermissionedDomainObject value. 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 for ImmutablePermissionedDomainObject.
       ImmutablePermissionedDomainObject.builder()
          .owner(org.xrpl.xrpl4j.model.transactions.Address) // required owner
          .ownerNode(String) // required ownerNode
          .sequence(com.google.common.primitives.UnsignedInteger) // required sequence
          .addAcceptedCredentials|addAllAcceptedCredentials(org.xrpl.xrpl4j.model.transactions.CredentialWrapper) // acceptedCredentials elements
          .previousTxnId(org.xrpl.xrpl4j.model.transactions.Hash256) // required previousTxnId
          .previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // required previousTransactionLedgerSequence
          .index(org.xrpl.xrpl4j.model.transactions.Hash256) // required index
          .build();
       
      Returns:
      A new ImmutablePermissionedDomainObject builder