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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableXChainBridge. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableXChainBridge.static ImmutableXChainBridgecopyOf(XChainBridge instance) Creates an immutable copy of aXChainBridgevalue.booleanThis instance is equal to all instances ofImmutableXChainBridgethat have equal attribute values.inthashCode()Computes a hash code from attributes:issuingChainDoor,issuingChainIssue,lockingChainDoor,lockingChainIssue.The door account on the issuing chain.The asset that is minted and burned on the issuing chain.The door account on the locking chain.The asset that is locked and unlocked on the locking chain.toString()Prints the immutable valueXChainBridgewith attribute values.final ImmutableXChainBridgewithIssuingChainDoor(Address value) Copy the current immutable object by setting a value for theissuingChainDoorattribute.final ImmutableXChainBridgewithIssuingChainIssue(Issue value) Copy the current immutable object by setting a value for theissuingChainIssueattribute.final ImmutableXChainBridgewithLockingChainDoor(Address value) Copy the current immutable object by setting a value for thelockingChainDoorattribute.final ImmutableXChainBridgewithLockingChainIssue(Issue value) Copy the current immutable object by setting a value for thelockingChainIssueattribute.
-
Method Details
-
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:
issuingChainDoorin interfaceXChainBridge- Returns:
- The
Addressof the door account.
-
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:
issuingChainIssuein interfaceXChainBridge- Returns:
- An
Issue.
-
lockingChainDoor
The door account on the locking chain.- Specified by:
lockingChainDoorin interfaceXChainBridge- Returns:
- The
Addressof the door account.
-
lockingChainIssue
The asset that is locked and unlocked on the locking chain.- Specified by:
lockingChainIssuein interfaceXChainBridge- Returns:
- An
Issue.
-
withIssuingChainDoor
Copy the current immutable object by setting a value for theissuingChainDoorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issuingChainDoor- Returns:
- A modified copy of the
thisobject
-
withIssuingChainIssue
Copy the current immutable object by setting a value for theissuingChainIssueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issuingChainIssue- Returns:
- A modified copy of the
thisobject
-
withLockingChainDoor
Copy the current immutable object by setting a value for thelockingChainDoorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lockingChainDoor- Returns:
- A modified copy of the
thisobject
-
withLockingChainIssue
Copy the current immutable object by setting a value for thelockingChainIssueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lockingChainIssue- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableXChainBridgethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:issuingChainDoor,issuingChainIssue,lockingChainDoor,lockingChainIssue. -
toString
Prints the immutable valueXChainBridgewith attribute values. -
copyOf
Creates an immutable copy of aXChainBridgevalue. 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
Creates a builder forImmutableXChainBridge.ImmutableXChainBridge.builder() .issuingChainDoor(org.xrpl.xrpl4j.model.transactions.Address) // requiredissuingChainDoor.issuingChainIssue(org.xrpl.xrpl4j.model.ledger.Issue) // requiredissuingChainIssue.lockingChainDoor(org.xrpl.xrpl4j.model.transactions.Address) // requiredlockingChainDoor.lockingChainIssue(org.xrpl.xrpl4j.model.ledger.Issue) // requiredlockingChainIssue.build();- Returns:
- A new ImmutableXChainBridge builder
-