Class ImmutableAttestationClaim

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableAttestationClaim
All Implemented Interfaces:
Attestation, AttestationClaim

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAttestationClaim extends Object implements AttestationClaim
Immutable implementation of AttestationClaim.

Use the builder to create immutable instances: ImmutableAttestationClaim.builder().

  • Method Details

    • xChainBridge

      public XChainBridge xChainBridge()
      The bridge spec.
      Specified by:
      xChainBridge in interface Attestation
      Returns:
      An XChainBridge.
    • otherChainSource

      public Address otherChainSource()
      The account on the source chain that submitted the XChainAccountCreateCommit transaction or XChainCommit transaction that triggered the event associated with the attestation.
      Specified by:
      otherChainSource in interface Attestation
      Returns:
      An Address.
    • attestationRewardAccount

      public Address attestationRewardAccount()
      The account that should receive this signer's share of the SignatureReward.
      Specified by:
      attestationRewardAccount in interface Attestation
      Returns:
      An Address.
    • amount

      public CurrencyAmount amount()
      The amount committed by the XChainAccountCreateCommit or XChainCommit transaction on the source chain.
      Specified by:
      amount in interface Attestation
      Returns:
      A CurrencyAmount.
    • wasLockingChainSend

      public boolean wasLockingChainSend()
      A boolean representing the chain where the event occurred.
      Specified by:
      wasLockingChainSend in interface Attestation
      Returns:
      true if the event occurred on the locking chain, otherwise false.
    • destination

      public Optional<Address> destination()
      The destination account for the funds on the destination chain.
      Specified by:
      destination in interface AttestationClaim
      Returns:
      An Address.
    • xChainClaimId

      public XChainClaimId xChainClaimId()
      Specified by:
      xChainClaimId in interface AttestationClaim
      Returns:
      An XChainClaimId.
    • withXChainBridge

      public final ImmutableAttestationClaim withXChainBridge(XChainBridge value)
      Copy the current immutable object by setting a value for the xChainBridge attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for xChainBridge
      Returns:
      A modified copy of the this object
    • withOtherChainSource

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

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

      public final ImmutableAttestationClaim withAmount(CurrencyAmount value)
      Copy the current immutable object by setting a value for the amount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for amount
      Returns:
      A modified copy of the this object
    • withWasLockingChainSend

      public final ImmutableAttestationClaim withWasLockingChainSend(boolean value)
      Copy the current immutable object by setting a value for the wasLockingChainSend attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for wasLockingChainSend
      Returns:
      A modified copy of the this object
    • withDestination

      public final ImmutableAttestationClaim withDestination(Address value)
      Copy the current immutable object by setting a present value for the optional destination attribute.
      Parameters:
      value - The value for destination
      Returns:
      A modified copy of this object
    • withDestination

      public final ImmutableAttestationClaim withDestination(Optional<? extends Address> optional)
      Copy the current immutable object by setting an optional value for the destination attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for destination
      Returns:
      A modified copy of this object
    • withXChainClaimId

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAttestationClaim 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: xChainBridge, otherChainSource, attestationRewardAccount, amount, wasLockingChainSend, destination, xChainClaimId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableAttestationClaim copyOf(AttestationClaim instance)
      Creates an immutable copy of a AttestationClaim 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 AttestationClaim instance
    • builder

      public static ImmutableAttestationClaim.Builder builder()
      Creates a builder for ImmutableAttestationClaim.
       ImmutableAttestationClaim.builder()
          .xChainBridge(org.xrpl.xrpl4j.model.transactions.XChainBridge) // required xChainBridge
          .otherChainSource(org.xrpl.xrpl4j.model.transactions.Address) // required otherChainSource
          .attestationRewardAccount(org.xrpl.xrpl4j.model.transactions.Address) // required attestationRewardAccount
          .amount(org.xrpl.xrpl4j.model.transactions.CurrencyAmount) // required amount
          .wasLockingChainSend(boolean) // required wasLockingChainSend
          .destination(org.xrpl.xrpl4j.model.transactions.Address) // optional destination
          .xChainClaimId(org.xrpl.xrpl4j.model.transactions.XChainClaimId) // required xChainClaimId
          .build();
       
      Returns:
      A new ImmutableAttestationClaim builder