Package org.xrpl.xrpl4j.model.ledger
Class ImmutableAccountRootObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableAccountRootObject.Builder
- Enclosing class:
ImmutableAccountRootObject
Builds instances of type
ImmutableAccountRootObject.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionInitializes the value for theaccountattribute.accountTransactionId(Optional<? extends Hash256> accountTransactionId) Initializes the optional valueaccountTransactionIdto accountTransactionId.accountTransactionId(Hash256 accountTransactionId) Initializes the optional valueaccountTransactionIdto accountTransactionId.addAllSignerLists(Iterable<? extends SignerListObject> elements) Adds elements tosignerListslist.addSignerLists(SignerListObject element) Adds one element tosignerListslist.addSignerLists(SignerListObject... elements) Adds elements tosignerListslist.Initializes the optional valueammIdto ammId.Initializes the optional valueammIdto ammId.balance(XrpCurrencyAmount balance) Initializes the value for thebalanceattribute.build()Builds a newImmutableAccountRootObject.burnedNfTokens(com.google.common.primitives.UnsignedInteger burnedNfTokens) Initializes the optional valueburnedNfTokensto burnedNfTokens.burnedNfTokens(Optional<? extends com.google.common.primitives.UnsignedInteger> burnedNfTokens) Initializes the optional valueburnedNfTokensto burnedNfTokens.Initializes the optional valuedomainto domain.Initializes the optional valuedomainto domain.Initializes the optional valueemailHashto emailHash.Initializes the optional valueemailHashto emailHash.flags(AccountRootFlags flags) Initializes the value for theflagsattribute.from(AccountRootObject instance) Fill a builder with attribute values from the providedAccountRootObjectinstance.Initializes the value for theindexattribute.messageKey(String messageKey) Initializes the optional valuemessageKeyto messageKey.messageKey(Optional<String> messageKey) Initializes the optional valuemessageKeyto messageKey.mintedNfTokens(com.google.common.primitives.UnsignedInteger mintedNfTokens) Initializes the optional valuemintedNfTokensto mintedNfTokens.mintedNfTokens(Optional<? extends com.google.common.primitives.UnsignedInteger> mintedNfTokens) Initializes the optional valuemintedNfTokensto mintedNfTokens.nfTokenMinter(Optional<? extends Address> nfTokenMinter) Initializes the optional valuenfTokenMinterto nfTokenMinter.nfTokenMinter(Address nfTokenMinter) Initializes the optional valuenfTokenMinterto nfTokenMinter.ownerCount(com.google.common.primitives.UnsignedInteger ownerCount) Initializes the value for theownerCountattribute.previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.regularKey(Optional<? extends Address> regularKey) Initializes the optional valueregularKeyto regularKey.regularKey(Address regularKey) Initializes the optional valueregularKeyto regularKey.sequence(com.google.common.primitives.UnsignedInteger sequence) Initializes the value for thesequenceattribute.signerLists(Iterable<? extends SignerListObject> elements) Sets or replaces all elements forsignerListslist.ticketCount(com.google.common.primitives.UnsignedInteger ticketCount) Initializes the optional valueticketCountto ticketCount.ticketCount(Optional<? extends com.google.common.primitives.UnsignedInteger> ticketCount) Initializes the optional valueticketCountto ticketCount.tickSize(com.google.common.primitives.UnsignedInteger tickSize) Initializes the optional valuetickSizeto tickSize.Initializes the optional valuetickSizeto tickSize.transferRate(com.google.common.primitives.UnsignedInteger transferRate) Initializes the optional valuetransferRateto transferRate.transferRate(Optional<? extends com.google.common.primitives.UnsignedInteger> transferRate) Initializes the optional valuetransferRateto transferRate.walletLocator(String walletLocator) Initializes the optional valuewalletLocatorto walletLocator.walletLocator(Optional<String> walletLocator) Initializes the optional valuewalletLocatorto walletLocator.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder from(AccountRootObject instance) Fill a builder with attribute values from the providedAccountRootObjectinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
account
Initializes the value for theaccountattribute.- Parameters:
account- The value for account- Returns:
thisbuilder for use in a chained invocation
-
balance
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder balance(XrpCurrencyAmount balance) Initializes the value for thebalanceattribute.- Parameters:
balance- The value for balance- Returns:
thisbuilder for use in a chained invocation
-
flags
Initializes the value for theflagsattribute.- Parameters:
flags- The value for flags- Returns:
thisbuilder for use in a chained invocation
-
ownerCount
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder ownerCount(com.google.common.primitives.UnsignedInteger ownerCount) Initializes the value for theownerCountattribute.- Parameters:
ownerCount- The value for ownerCount- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.- Parameters:
previousTransactionId- The value for previousTransactionId- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionLedgerSequence
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.- Parameters:
previousTransactionLedgerSequence- The value for previousTransactionLedgerSequence- Returns:
thisbuilder for use in a chained invocation
-
sequence
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder sequence(com.google.common.primitives.UnsignedInteger sequence) Initializes the value for thesequenceattribute.- Parameters:
sequence- The value for sequence- Returns:
thisbuilder for use in a chained invocation
-
accountTransactionId
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder accountTransactionId(Hash256 accountTransactionId) Initializes the optional valueaccountTransactionIdto accountTransactionId.- Parameters:
accountTransactionId- The value for accountTransactionId- Returns:
thisbuilder for chained invocation
-
accountTransactionId
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder accountTransactionId(Optional<? extends Hash256> accountTransactionId) Initializes the optional valueaccountTransactionIdto accountTransactionId.- Parameters:
accountTransactionId- The value for accountTransactionId- Returns:
thisbuilder for use in a chained invocation
-
domain
Initializes the optional valuedomainto domain.- Parameters:
domain- The value for domain- Returns:
thisbuilder for chained invocation
-
domain
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder domain(Optional<String> domain) Initializes the optional valuedomainto domain.- Parameters:
domain- The value for domain- Returns:
thisbuilder for use in a chained invocation
-
emailHash
Initializes the optional valueemailHashto emailHash.- Parameters:
emailHash- The value for emailHash- Returns:
thisbuilder for chained invocation
-
emailHash
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder emailHash(Optional<String> emailHash) Initializes the optional valueemailHashto emailHash.- Parameters:
emailHash- The value for emailHash- Returns:
thisbuilder for use in a chained invocation
-
messageKey
Initializes the optional valuemessageKeyto messageKey.- Parameters:
messageKey- The value for messageKey- Returns:
thisbuilder for chained invocation
-
messageKey
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder messageKey(Optional<String> messageKey) Initializes the optional valuemessageKeyto messageKey.- Parameters:
messageKey- The value for messageKey- Returns:
thisbuilder for use in a chained invocation
-
regularKey
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder regularKey(Address regularKey) Initializes the optional valueregularKeyto regularKey.- Parameters:
regularKey- The value for regularKey- Returns:
thisbuilder for chained invocation
-
regularKey
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder regularKey(Optional<? extends Address> regularKey) Initializes the optional valueregularKeyto regularKey.- Parameters:
regularKey- The value for regularKey- Returns:
thisbuilder for use in a chained invocation
-
tickSize
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder tickSize(com.google.common.primitives.UnsignedInteger tickSize) Initializes the optional valuetickSizeto tickSize.- Parameters:
tickSize- The value for tickSize- Returns:
thisbuilder for chained invocation
-
tickSize
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder tickSize(Optional<? extends com.google.common.primitives.UnsignedInteger> tickSize) Initializes the optional valuetickSizeto tickSize.- Parameters:
tickSize- The value for tickSize- Returns:
thisbuilder for use in a chained invocation
-
transferRate
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder transferRate(com.google.common.primitives.UnsignedInteger transferRate) Initializes the optional valuetransferRateto transferRate.- Parameters:
transferRate- The value for transferRate- Returns:
thisbuilder for chained invocation
-
transferRate
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder transferRate(Optional<? extends com.google.common.primitives.UnsignedInteger> transferRate) Initializes the optional valuetransferRateto transferRate.- Parameters:
transferRate- The value for transferRate- Returns:
thisbuilder for use in a chained invocation
-
addSignerLists
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder addSignerLists(SignerListObject element) Adds one element tosignerListslist.- Parameters:
element- A signerLists element- Returns:
thisbuilder for use in a chained invocation
-
addSignerLists
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder addSignerLists(SignerListObject... elements) Adds elements tosignerListslist.- Parameters:
elements- An array of signerLists elements- Returns:
thisbuilder for use in a chained invocation
-
signerLists
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder signerLists(Iterable<? extends SignerListObject> elements) Sets or replaces all elements forsignerListslist.- Parameters:
elements- An iterable of signerLists elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSignerLists
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder addAllSignerLists(Iterable<? extends SignerListObject> elements) Adds elements tosignerListslist.- Parameters:
elements- An iterable of signerLists elements- Returns:
thisbuilder for use in a chained invocation
-
ticketCount
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder ticketCount(com.google.common.primitives.UnsignedInteger ticketCount) Initializes the optional valueticketCountto ticketCount.- Parameters:
ticketCount- The value for ticketCount- Returns:
thisbuilder for chained invocation
-
ticketCount
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder ticketCount(Optional<? extends com.google.common.primitives.UnsignedInteger> ticketCount) Initializes the optional valueticketCountto ticketCount.- Parameters:
ticketCount- The value for ticketCount- Returns:
thisbuilder for use in a chained invocation
-
burnedNfTokens
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder burnedNfTokens(com.google.common.primitives.UnsignedInteger burnedNfTokens) Initializes the optional valueburnedNfTokensto burnedNfTokens.- Parameters:
burnedNfTokens- The value for burnedNfTokens- Returns:
thisbuilder for chained invocation
-
burnedNfTokens
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder burnedNfTokens(Optional<? extends com.google.common.primitives.UnsignedInteger> burnedNfTokens) Initializes the optional valueburnedNfTokensto burnedNfTokens.- Parameters:
burnedNfTokens- The value for burnedNfTokens- Returns:
thisbuilder for use in a chained invocation
-
mintedNfTokens
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder mintedNfTokens(com.google.common.primitives.UnsignedInteger mintedNfTokens) Initializes the optional valuemintedNfTokensto mintedNfTokens.- Parameters:
mintedNfTokens- The value for mintedNfTokens- Returns:
thisbuilder for chained invocation
-
mintedNfTokens
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder mintedNfTokens(Optional<? extends com.google.common.primitives.UnsignedInteger> mintedNfTokens) Initializes the optional valuemintedNfTokensto mintedNfTokens.- Parameters:
mintedNfTokens- The value for mintedNfTokens- Returns:
thisbuilder for use in a chained invocation
-
nfTokenMinter
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder nfTokenMinter(Address nfTokenMinter) Initializes the optional valuenfTokenMinterto nfTokenMinter.- Parameters:
nfTokenMinter- The value for nfTokenMinter- Returns:
thisbuilder for chained invocation
-
nfTokenMinter
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder nfTokenMinter(Optional<? extends Address> nfTokenMinter) Initializes the optional valuenfTokenMinterto nfTokenMinter.- Parameters:
nfTokenMinter- The value for nfTokenMinter- Returns:
thisbuilder for use in a chained invocation
-
ammId
Initializes the optional valueammIdto ammId.- Parameters:
ammId- The value for ammId- Returns:
thisbuilder for chained invocation
-
ammId
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder ammId(Optional<? extends Hash256> ammId) Initializes the optional valueammIdto ammId.- Parameters:
ammId- The value for ammId- Returns:
thisbuilder for use in a chained invocation
-
walletLocator
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder walletLocator(String walletLocator) Initializes the optional valuewalletLocatorto walletLocator.- Parameters:
walletLocator- The value for walletLocator- Returns:
thisbuilder for chained invocation
-
walletLocator
@CanIgnoreReturnValue public final ImmutableAccountRootObject.Builder walletLocator(Optional<String> walletLocator) Initializes the optional valuewalletLocatorto walletLocator.- Parameters:
walletLocator- The value for walletLocator- Returns:
thisbuilder for use in a chained invocation
-
index
Initializes the value for theindexattribute.- Parameters:
index- The value for index- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAccountRootObject.- Returns:
- An immutable instance of AccountRootObject
- Throws:
IllegalStateException- if any required attributes are missing
-