Package org.xrpl.xrpl4j.model.ledger
Class ImmutableBridgeObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableBridgeObject
- All Implemented Interfaces:
BridgeObject,LedgerObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBridgeObject
extends Object
implements BridgeObject
Immutable implementation of
BridgeObject.
Use the builder to create immutable instances:
ImmutableBridgeObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableBridgeObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that owns this object.builder()Creates a builder forImmutableBridgeObject.static ImmutableBridgeObjectcopyOf(BridgeObject instance) Creates an immutable copy of aBridgeObjectvalue.booleanThis instance is equal to all instances ofImmutableBridgeObjectthat have equal attribute values.flags()A bit-map of boolean flags.inthashCode()Computes a hash code from attributes:ledgerEntryType,flags,account,minAccountCreateAmount,signatureReward,xChainBridge,xChainClaimId,xChainAccountCreateCount,xChainAccountClaimCount,ownerNode,previousTransactionId,previousTransactionLedgerSequence,index.index()The unique ID of theBridgeObject.The type of ledger object, which will always be "Bridge" in this case.The minimum amount, in XRP, required for an XChainAccountCreateCommit transaction.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.The total amount, in XRP, to be rewarded for providing a signature for cross-chain transfer or for signing for the cross-chain reward.toString()Prints the immutable valueBridgeObjectwith attribute values.final ImmutableBridgeObjectwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableBridgeObjectCopy the current immutable object by setting a value for theindexattribute.final ImmutableBridgeObjectwithMinAccountCreateAmount(Optional<? extends XrpCurrencyAmount> optional) Copy the current immutable object by setting an optional value for theminAccountCreateAmountattribute.final ImmutableBridgeObjectCopy the current immutable object by setting a present value for the optionalminAccountCreateAmountattribute.final ImmutableBridgeObjectwithOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.final ImmutableBridgeObjectwithPreviousTransactionId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTransactionIdattribute.final ImmutableBridgeObjectwithPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.final ImmutableBridgeObjectCopy the current immutable object by setting a value for thesignatureRewardattribute.final ImmutableBridgeObjectCopy the current immutable object by setting a value for thexChainAccountClaimCountattribute.final ImmutableBridgeObjectCopy the current immutable object by setting a value for thexChainAccountCreateCountattribute.final ImmutableBridgeObjectwithXChainBridge(XChainBridge value) Copy the current immutable object by setting a value for thexChainBridgeattribute.final ImmutableBridgeObjectwithXChainClaimId(XChainClaimId value) Copy the current immutable object by setting a value for thexChainClaimIdattribute.A counter used to order the execution of account create transactions.A counter used to order the execution of account create transactions.The door accounts and assets of the bridge this object correlates to.The value of the next XChainClaimID to be created.
-
Method Details
-
ledgerEntryType
The type of ledger object, which will always be "Bridge" in this case.- Specified by:
ledgerEntryTypein interfaceBridgeObject- Returns:
- Always returns
LedgerObject.LedgerEntryType.BRIDGE.
-
flags
A bit-map of boolean flags. No flags are defined forBridgeObject, so this value is always 0.- Specified by:
flagsin interfaceBridgeObject- Returns:
- Always
Flags.UNSET.
-
account
The account that owns this object.- Specified by:
accountin interfaceBridgeObject- Returns:
- An
Address.
-
minAccountCreateAmount
The minimum amount, in XRP, required for an XChainAccountCreateCommit transaction. If this isn't present, theXChainAccountCreateCommittransaction will fail. This field can only be present on XRP-XRP bridges.- Specified by:
minAccountCreateAmountin interfaceBridgeObject- Returns:
- An optionally-present
XrpCurrencyAmount.
-
signatureReward
The total amount, in XRP, to be rewarded for providing a signature for cross-chain transfer or for signing for the cross-chain reward. This amount will be split among the signers.- Specified by:
signatureRewardin interfaceBridgeObject- Returns:
- An
XrpCurrencyAmount.
-
xChainBridge
The door accounts and assets of the bridge this object correlates to.- Specified by:
xChainBridgein interfaceBridgeObject- Returns:
- An
XChainBridge.
-
xChainClaimId
The value of the next XChainClaimID to be created.- Specified by:
xChainClaimIdin interfaceBridgeObject- Returns:
- An
XChainClaimId.
-
xChainAccountCreateCount
A counter used to order the execution of account create transactions. It is incremented every time a successfulXChainAccountCreateCommittransaction is run for the source chain.- Specified by:
xChainAccountCreateCountin interfaceBridgeObject- Returns:
- An
XChainCount.
-
xChainAccountClaimCount
A counter used to order the execution of account create transactions. It is incremented every time aXChainAccountCreateCommittransaction is "claimed" on the destination chain. When the "claim" transaction is run on the destination chain, thexChainAccountClaimCount()must match the value that thexChainAccountCreateCount()had at the time thexChainAccountClaimCount()was run on the source chain. This orders the claims so that they run in the same order that theXChainAccountCreateCommittransactions ran on the source chain, to prevent transaction replay.- Specified by:
xChainAccountClaimCountin interfaceBridgeObject- Returns:
- An
XChainCount.
-
ownerNode
A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.
- Specified by:
ownerNodein interfaceBridgeObject- Returns:
- A
Stringcontaining the owner node hint.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceBridgeObject- 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 interfaceBridgeObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
index
The unique ID of theBridgeObject.- Specified by:
indexin interfaceBridgeObject- Returns:
- A
Hash256containing the ID.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
withMinAccountCreateAmount
Copy the current immutable object by setting a present value for the optionalminAccountCreateAmountattribute.- Parameters:
value- The value for minAccountCreateAmount- Returns:
- A modified copy of
thisobject
-
withMinAccountCreateAmount
public final ImmutableBridgeObject withMinAccountCreateAmount(Optional<? extends XrpCurrencyAmount> optional) Copy the current immutable object by setting an optional value for theminAccountCreateAmountattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for minAccountCreateAmount- Returns:
- A modified copy of
thisobject
-
withSignatureReward
Copy the current immutable object by setting a value for thesignatureRewardattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for signatureReward- Returns:
- A modified copy of the
thisobject
-
withXChainBridge
Copy the current immutable object by setting a value for thexChainBridgeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for xChainBridge- Returns:
- A modified copy of the
thisobject
-
withXChainClaimId
Copy the current immutable object by setting a value for thexChainClaimIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for xChainClaimId- Returns:
- A modified copy of the
thisobject
-
withXChainAccountCreateCount
Copy the current immutable object by setting a value for thexChainAccountCreateCountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for xChainAccountCreateCount- Returns:
- A modified copy of the
thisobject
-
withXChainAccountClaimCount
Copy the current immutable object by setting a value for thexChainAccountClaimCountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for xChainAccountClaimCount- 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
-
withPreviousTransactionId
Copy the current immutable object by setting a value for thepreviousTransactionIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionId- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionLedgerSequence
public final ImmutableBridgeObject 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 ofImmutableBridgeObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,flags,account,minAccountCreateAmount,signatureReward,xChainBridge,xChainClaimId,xChainAccountCreateCount,xChainAccountClaimCount,ownerNode,previousTransactionId,previousTransactionLedgerSequence,index. -
toString
Prints the immutable valueBridgeObjectwith attribute values. -
copyOf
Creates an immutable copy of aBridgeObjectvalue. 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 BridgeObject instance
-
builder
Creates a builder forImmutableBridgeObject.ImmutableBridgeObject.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.minAccountCreateAmount(org.xrpl.xrpl4j.model.transactions.XrpCurrencyAmount) // optionalminAccountCreateAmount.signatureReward(org.xrpl.xrpl4j.model.transactions.XrpCurrencyAmount) // requiredsignatureReward.xChainBridge(org.xrpl.xrpl4j.model.transactions.XChainBridge) // requiredxChainBridge.xChainClaimId(org.xrpl.xrpl4j.model.transactions.XChainClaimId) // requiredxChainClaimId.xChainAccountCreateCount(org.xrpl.xrpl4j.model.transactions.XChainCount) // requiredxChainAccountCreateCount.xChainAccountClaimCount(org.xrpl.xrpl4j.model.transactions.XChainCount) // requiredxChainAccountClaimCount.ownerNode(String) // requiredownerNode.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableBridgeObject builder
-