Class ImmutablePayment.Builder
- java.lang.Object
-
- org.xrpl.xrpl4j.model.transactions.ImmutablePayment.Builder
-
- Enclosing class:
- ImmutablePayment
@NotThreadSafe public static final class ImmutablePayment.Builder extends Object
Builds instances of typeImmutablePayment
. Initialize attributes and then invoke thebuild()
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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ImmutablePayment.Builder
account(Address account)
Initializes the value for theaccount
attribute.ImmutablePayment.Builder
accountTransactionId(Optional<? extends Hash256> accountTransactionId)
Initializes the optional valueaccountTransactionId
to accountTransactionId.ImmutablePayment.Builder
accountTransactionId(Hash256 accountTransactionId)
Initializes the optional valueaccountTransactionId
to accountTransactionId.ImmutablePayment.Builder
addAllMemos(Iterable<? extends MemoWrapper> elements)
Adds elements tomemos
list.ImmutablePayment.Builder
addAllPaths(Iterable<? extends List<PathStep>> elements)
Adds elements topaths
list.ImmutablePayment.Builder
addAllSigners(Iterable<? extends SignerWrapper> elements)
Adds elements tosigners
list.ImmutablePayment.Builder
addMemos(MemoWrapper element)
Adds one element tomemos
list.ImmutablePayment.Builder
addMemos(MemoWrapper... elements)
Adds elements tomemos
list.ImmutablePayment.Builder
addPaths(List<PathStep> element)
Adds one element topaths
list.ImmutablePayment.Builder
addPaths(List<PathStep>... elements)
Adds elements topaths
list.ImmutablePayment.Builder
addSigners(SignerWrapper element)
Adds one element tosigners
list.ImmutablePayment.Builder
addSigners(SignerWrapper... elements)
Adds elements tosigners
list.ImmutablePayment.Builder
amount(CurrencyAmount amount)
Initializes the value for theamount
attribute.ImmutablePayment
build()
Builds a newImmutablePayment
.ImmutablePayment.Builder
closeDate(com.google.common.primitives.UnsignedLong closeDate)
Deprecated.ImmutablePayment.Builder
closeDate(Optional<? extends com.google.common.primitives.UnsignedLong> closeDate)
Deprecated.ImmutablePayment.Builder
deliverMin(Optional<? extends CurrencyAmount> deliverMin)
Initializes the optional valuedeliverMin
to deliverMin.ImmutablePayment.Builder
deliverMin(CurrencyAmount deliverMin)
Initializes the optional valuedeliverMin
to deliverMin.ImmutablePayment.Builder
destination(Address destination)
Initializes the value for thedestination
attribute.ImmutablePayment.Builder
destinationTag(com.google.common.primitives.UnsignedInteger destinationTag)
Initializes the optional valuedestinationTag
to destinationTag.ImmutablePayment.Builder
destinationTag(Optional<? extends com.google.common.primitives.UnsignedInteger> destinationTag)
Initializes the optional valuedestinationTag
to destinationTag.ImmutablePayment.Builder
fee(XrpCurrencyAmount fee)
Initializes the value for thefee
attribute.ImmutablePayment.Builder
flags(Flags.PaymentFlags flags)
Initializes the value for theflags
attribute.ImmutablePayment.Builder
from(Payment instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.transactions.Payment
instance.ImmutablePayment.Builder
from(Transaction instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.transactions.Transaction
instance.ImmutablePayment.Builder
hash(Optional<? extends Hash256> hash)
Deprecated.ImmutablePayment.Builder
hash(Hash256 hash)
Deprecated.ImmutablePayment.Builder
invoiceId(Optional<? extends Hash256> invoiceId)
Initializes the optional valueinvoiceId
to invoiceId.ImmutablePayment.Builder
invoiceId(Hash256 invoiceId)
Initializes the optional valueinvoiceId
to invoiceId.ImmutablePayment.Builder
lastLedgerSequence(com.google.common.primitives.UnsignedInteger lastLedgerSequence)
Initializes the optional valuelastLedgerSequence
to lastLedgerSequence.ImmutablePayment.Builder
lastLedgerSequence(Optional<? extends com.google.common.primitives.UnsignedInteger> lastLedgerSequence)
Initializes the optional valuelastLedgerSequence
to lastLedgerSequence.ImmutablePayment.Builder
ledgerIndex(Optional<? extends LedgerIndex> ledgerIndex)
Deprecated.ImmutablePayment.Builder
ledgerIndex(LedgerIndex ledgerIndex)
Deprecated.ImmutablePayment.Builder
memos(Iterable<? extends MemoWrapper> elements)
Sets or replaces all elements formemos
list.ImmutablePayment.Builder
paths(Iterable<? extends List<PathStep>> elements)
Sets or replaces all elements forpaths
list.ImmutablePayment.Builder
sendMax(Optional<? extends CurrencyAmount> sendMax)
Initializes the optional valuesendMax
to sendMax.ImmutablePayment.Builder
sendMax(CurrencyAmount sendMax)
Initializes the optional valuesendMax
to sendMax.ImmutablePayment.Builder
sequence(com.google.common.primitives.UnsignedInteger sequence)
Initializes the value for thesequence
attribute.ImmutablePayment.Builder
signers(Iterable<? extends SignerWrapper> elements)
Sets or replaces all elements forsigners
list.ImmutablePayment.Builder
signingPublicKey(String signingPublicKey)
Initializes the optional valuesigningPublicKey
to signingPublicKey.ImmutablePayment.Builder
signingPublicKey(Optional<String> signingPublicKey)
Initializes the optional valuesigningPublicKey
to signingPublicKey.ImmutablePayment.Builder
sourceTag(com.google.common.primitives.UnsignedInteger sourceTag)
Initializes the optional valuesourceTag
to sourceTag.ImmutablePayment.Builder
sourceTag(Optional<? extends com.google.common.primitives.UnsignedInteger> sourceTag)
Initializes the optional valuesourceTag
to sourceTag.ImmutablePayment.Builder
transactionSignature(String transactionSignature)
Initializes the optional valuetransactionSignature
to transactionSignature.ImmutablePayment.Builder
transactionSignature(Optional<String> transactionSignature)
Initializes the optional valuetransactionSignature
to transactionSignature.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePayment.Builder from(Transaction instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.transactions.Transaction
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePayment.Builder from(Payment instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.transactions.Payment
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
account
@CanIgnoreReturnValue public final ImmutablePayment.Builder account(Address account)
Initializes the value for theaccount
attribute.- Parameters:
account
- The value for account- Returns:
this
builder for use in a chained invocation
-
fee
@CanIgnoreReturnValue public final ImmutablePayment.Builder fee(XrpCurrencyAmount fee)
Initializes the value for thefee
attribute.- Parameters:
fee
- The value for fee- Returns:
this
builder for use in a chained invocation
-
sequence
@CanIgnoreReturnValue public final ImmutablePayment.Builder sequence(com.google.common.primitives.UnsignedInteger sequence)
Initializes the value for thesequence
attribute.- Parameters:
sequence
- The value for sequence- Returns:
this
builder for use in a chained invocation
-
accountTransactionId
@CanIgnoreReturnValue public final ImmutablePayment.Builder accountTransactionId(Hash256 accountTransactionId)
Initializes the optional valueaccountTransactionId
to accountTransactionId.- Parameters:
accountTransactionId
- The value for accountTransactionId- Returns:
this
builder for chained invocation
-
accountTransactionId
@CanIgnoreReturnValue public final ImmutablePayment.Builder accountTransactionId(Optional<? extends Hash256> accountTransactionId)
Initializes the optional valueaccountTransactionId
to accountTransactionId.- Parameters:
accountTransactionId
- The value for accountTransactionId- Returns:
this
builder for use in a chained invocation
-
lastLedgerSequence
@CanIgnoreReturnValue public final ImmutablePayment.Builder lastLedgerSequence(com.google.common.primitives.UnsignedInteger lastLedgerSequence)
Initializes the optional valuelastLedgerSequence
to lastLedgerSequence.- Parameters:
lastLedgerSequence
- The value for lastLedgerSequence- Returns:
this
builder for chained invocation
-
lastLedgerSequence
@CanIgnoreReturnValue public final ImmutablePayment.Builder lastLedgerSequence(Optional<? extends com.google.common.primitives.UnsignedInteger> lastLedgerSequence)
Initializes the optional valuelastLedgerSequence
to lastLedgerSequence.- Parameters:
lastLedgerSequence
- The value for lastLedgerSequence- Returns:
this
builder for use in a chained invocation
-
addMemos
@CanIgnoreReturnValue public final ImmutablePayment.Builder addMemos(MemoWrapper element)
Adds one element tomemos
list.- Parameters:
element
- A memos element- Returns:
this
builder for use in a chained invocation
-
addMemos
@CanIgnoreReturnValue public final ImmutablePayment.Builder addMemos(MemoWrapper... elements)
Adds elements tomemos
list.- Parameters:
elements
- An array of memos elements- Returns:
this
builder for use in a chained invocation
-
memos
@CanIgnoreReturnValue public final ImmutablePayment.Builder memos(Iterable<? extends MemoWrapper> elements)
Sets or replaces all elements formemos
list.- Parameters:
elements
- An iterable of memos elements- Returns:
this
builder for use in a chained invocation
-
addAllMemos
@CanIgnoreReturnValue public final ImmutablePayment.Builder addAllMemos(Iterable<? extends MemoWrapper> elements)
Adds elements tomemos
list.- Parameters:
elements
- An iterable of memos elements- Returns:
this
builder for use in a chained invocation
-
addSigners
@CanIgnoreReturnValue public final ImmutablePayment.Builder addSigners(SignerWrapper element)
Adds one element tosigners
list.- Parameters:
element
- A signers element- Returns:
this
builder for use in a chained invocation
-
addSigners
@CanIgnoreReturnValue public final ImmutablePayment.Builder addSigners(SignerWrapper... elements)
Adds elements tosigners
list.- Parameters:
elements
- An array of signers elements- Returns:
this
builder for use in a chained invocation
-
signers
@CanIgnoreReturnValue public final ImmutablePayment.Builder signers(Iterable<? extends SignerWrapper> elements)
Sets or replaces all elements forsigners
list.- Parameters:
elements
- An iterable of signers elements- Returns:
this
builder for use in a chained invocation
-
addAllSigners
@CanIgnoreReturnValue public final ImmutablePayment.Builder addAllSigners(Iterable<? extends SignerWrapper> elements)
Adds elements tosigners
list.- Parameters:
elements
- An iterable of signers elements- Returns:
this
builder for use in a chained invocation
-
sourceTag
@CanIgnoreReturnValue public final ImmutablePayment.Builder sourceTag(com.google.common.primitives.UnsignedInteger sourceTag)
Initializes the optional valuesourceTag
to sourceTag.- Parameters:
sourceTag
- The value for sourceTag- Returns:
this
builder for chained invocation
-
sourceTag
@CanIgnoreReturnValue public final ImmutablePayment.Builder sourceTag(Optional<? extends com.google.common.primitives.UnsignedInteger> sourceTag)
Initializes the optional valuesourceTag
to sourceTag.- Parameters:
sourceTag
- The value for sourceTag- Returns:
this
builder for use in a chained invocation
-
signingPublicKey
@CanIgnoreReturnValue public final ImmutablePayment.Builder signingPublicKey(String signingPublicKey)
Initializes the optional valuesigningPublicKey
to signingPublicKey.- Parameters:
signingPublicKey
- The value for signingPublicKey- Returns:
this
builder for chained invocation
-
signingPublicKey
@CanIgnoreReturnValue public final ImmutablePayment.Builder signingPublicKey(Optional<String> signingPublicKey)
Initializes the optional valuesigningPublicKey
to signingPublicKey.- Parameters:
signingPublicKey
- The value for signingPublicKey- Returns:
this
builder for use in a chained invocation
-
transactionSignature
@CanIgnoreReturnValue public final ImmutablePayment.Builder transactionSignature(String transactionSignature)
Initializes the optional valuetransactionSignature
to transactionSignature.- Parameters:
transactionSignature
- The value for transactionSignature- Returns:
this
builder for chained invocation
-
transactionSignature
@CanIgnoreReturnValue public final ImmutablePayment.Builder transactionSignature(Optional<String> transactionSignature)
Initializes the optional valuetransactionSignature
to transactionSignature.- Parameters:
transactionSignature
- The value for transactionSignature- Returns:
this
builder for use in a chained invocation
-
closeDate
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder closeDate(com.google.common.primitives.UnsignedLong closeDate)
Deprecated.Initializes the optional valuecloseDate
to closeDate.- Parameters:
closeDate
- The value for closeDate- Returns:
this
builder for chained invocation
-
closeDate
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder closeDate(Optional<? extends com.google.common.primitives.UnsignedLong> closeDate)
Deprecated.Initializes the optional valuecloseDate
to closeDate.- Parameters:
closeDate
- The value for closeDate- Returns:
this
builder for use in a chained invocation
-
hash
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder hash(Hash256 hash)
Deprecated.Initializes the optional valuehash
to hash.- Parameters:
hash
- The value for hash- Returns:
this
builder for chained invocation
-
hash
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder hash(Optional<? extends Hash256> hash)
Deprecated.Initializes the optional valuehash
to hash.- Parameters:
hash
- The value for hash- Returns:
this
builder for use in a chained invocation
-
ledgerIndex
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder ledgerIndex(LedgerIndex ledgerIndex)
Deprecated.Initializes the optional valueledgerIndex
to ledgerIndex.- Parameters:
ledgerIndex
- The value for ledgerIndex- Returns:
this
builder for chained invocation
-
ledgerIndex
@CanIgnoreReturnValue @Deprecated public final ImmutablePayment.Builder ledgerIndex(Optional<? extends LedgerIndex> ledgerIndex)
Deprecated.Initializes the optional valueledgerIndex
to ledgerIndex.- Parameters:
ledgerIndex
- The value for ledgerIndex- Returns:
this
builder for use in a chained invocation
-
flags
@CanIgnoreReturnValue public final ImmutablePayment.Builder flags(Flags.PaymentFlags flags)
Initializes the value for theflags
attribute.If not set, this attribute will have a default value as returned by the initializer of
flags
.- Parameters:
flags
- The value for flags- Returns:
this
builder for use in a chained invocation
-
amount
@CanIgnoreReturnValue public final ImmutablePayment.Builder amount(CurrencyAmount amount)
Initializes the value for theamount
attribute.- Parameters:
amount
- The value for amount- Returns:
this
builder for use in a chained invocation
-
destination
@CanIgnoreReturnValue public final ImmutablePayment.Builder destination(Address destination)
Initializes the value for thedestination
attribute.- Parameters:
destination
- The value for destination- Returns:
this
builder for use in a chained invocation
-
destinationTag
@CanIgnoreReturnValue public final ImmutablePayment.Builder destinationTag(com.google.common.primitives.UnsignedInteger destinationTag)
Initializes the optional valuedestinationTag
to destinationTag.- Parameters:
destinationTag
- The value for destinationTag- Returns:
this
builder for chained invocation
-
destinationTag
@CanIgnoreReturnValue public final ImmutablePayment.Builder destinationTag(Optional<? extends com.google.common.primitives.UnsignedInteger> destinationTag)
Initializes the optional valuedestinationTag
to destinationTag.- Parameters:
destinationTag
- The value for destinationTag- Returns:
this
builder for use in a chained invocation
-
invoiceId
@CanIgnoreReturnValue public final ImmutablePayment.Builder invoiceId(Hash256 invoiceId)
Initializes the optional valueinvoiceId
to invoiceId.- Parameters:
invoiceId
- The value for invoiceId- Returns:
this
builder for chained invocation
-
invoiceId
@CanIgnoreReturnValue public final ImmutablePayment.Builder invoiceId(Optional<? extends Hash256> invoiceId)
Initializes the optional valueinvoiceId
to invoiceId.- Parameters:
invoiceId
- The value for invoiceId- Returns:
this
builder for use in a chained invocation
-
addPaths
@CanIgnoreReturnValue public final ImmutablePayment.Builder addPaths(List<PathStep> element)
Adds one element topaths
list.- Parameters:
element
- A paths element- Returns:
this
builder for use in a chained invocation
-
addPaths
@CanIgnoreReturnValue @SafeVarargs public final ImmutablePayment.Builder addPaths(List<PathStep>... elements)
Adds elements topaths
list.- Parameters:
elements
- An array of paths elements- Returns:
this
builder for use in a chained invocation
-
paths
@CanIgnoreReturnValue public final ImmutablePayment.Builder paths(Iterable<? extends List<PathStep>> elements)
Sets or replaces all elements forpaths
list.- Parameters:
elements
- An iterable of paths elements- Returns:
this
builder for use in a chained invocation
-
addAllPaths
@CanIgnoreReturnValue public final ImmutablePayment.Builder addAllPaths(Iterable<? extends List<PathStep>> elements)
Adds elements topaths
list.- Parameters:
elements
- An iterable of paths elements- Returns:
this
builder for use in a chained invocation
-
sendMax
@CanIgnoreReturnValue public final ImmutablePayment.Builder sendMax(CurrencyAmount sendMax)
Initializes the optional valuesendMax
to sendMax.- Parameters:
sendMax
- The value for sendMax- Returns:
this
builder for chained invocation
-
sendMax
@CanIgnoreReturnValue public final ImmutablePayment.Builder sendMax(Optional<? extends CurrencyAmount> sendMax)
Initializes the optional valuesendMax
to sendMax.- Parameters:
sendMax
- The value for sendMax- Returns:
this
builder for use in a chained invocation
-
deliverMin
@CanIgnoreReturnValue public final ImmutablePayment.Builder deliverMin(CurrencyAmount deliverMin)
Initializes the optional valuedeliverMin
to deliverMin.- Parameters:
deliverMin
- The value for deliverMin- Returns:
this
builder for chained invocation
-
deliverMin
@CanIgnoreReturnValue public final ImmutablePayment.Builder deliverMin(Optional<? extends CurrencyAmount> deliverMin)
Initializes the optional valuedeliverMin
to deliverMin.- Parameters:
deliverMin
- The value for deliverMin- Returns:
this
builder for use in a chained invocation
-
build
public ImmutablePayment build()
Builds a newImmutablePayment
.- Returns:
- An immutable instance of Payment
- Throws:
IllegalStateException
- if any required attributes are missing
-
-