Class ImmutableXChainBridge

java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableXChainBridge
All Implemented Interfaces:
XChainBridge

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

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

  • Method Details

    • issuingChainDoor

      public Address issuingChainDoor()
      The door account on the issuing chain. For an XRP-XRP bridge, this must be the genesis account (the account that is created when the network is first started, which contains all of the XRP).
      Specified by:
      issuingChainDoor in interface XChainBridge
      Returns:
      The Address of the door account.
    • issuingChainIssue

      public Issue issuingChainIssue()
      The asset that is minted and burned on the issuing chain. For an IOU-IOU bridge, the issuer of the asset must be the door account on the issuing chain, to avoid supply issues.
      Specified by:
      issuingChainIssue in interface XChainBridge
      Returns:
      An Issue.
    • lockingChainDoor

      public Address lockingChainDoor()
      The door account on the locking chain.
      Specified by:
      lockingChainDoor in interface XChainBridge
      Returns:
      The Address of the door account.
    • lockingChainIssue

      public Issue lockingChainIssue()
      The asset that is locked and unlocked on the locking chain.
      Specified by:
      lockingChainIssue in interface XChainBridge
      Returns:
      An Issue.
    • withIssuingChainDoor

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

      public final ImmutableXChainBridge withIssuingChainIssue(Issue value)
      Copy the current immutable object by setting a value for the issuingChainIssue attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for issuingChainIssue
      Returns:
      A modified copy of the this object
    • withLockingChainDoor

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableXChainBridge 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: issuingChainDoor, issuingChainIssue, lockingChainDoor, lockingChainIssue.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableXChainBridge.Builder builder()
      Creates a builder for ImmutableXChainBridge.
       ImmutableXChainBridge.builder()
          .issuingChainDoor(org.xrpl.xrpl4j.model.transactions.Address) // required issuingChainDoor
          .issuingChainIssue(org.xrpl.xrpl4j.model.ledger.Issue) // required issuingChainIssue
          .lockingChainDoor(org.xrpl.xrpl4j.model.transactions.Address) // required lockingChainDoor
          .lockingChainIssue(org.xrpl.xrpl4j.model.ledger.Issue) // required lockingChainIssue
          .build();
       
      Returns:
      A new ImmutableXChainBridge builder