Class ImmutableRipplePathFindRequestParams.Builder
- java.lang.Object
-
- org.xrpl.xrpl4j.model.client.path.ImmutableRipplePathFindRequestParams.Builder
-
- Enclosing class:
- ImmutableRipplePathFindRequestParams
@NotThreadSafe public static final class ImmutableRipplePathFindRequestParams.Builder extends Object
Builds instances of typeImmutableRipplePathFindRequestParams
. 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
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder from(RipplePathFindRequestParams instance)
Fill a builder with attribute values from the providedRipplePathFindRequestParams
instance. 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:
this
builder for use in a chained invocation
-
sourceAccount
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder sourceAccount(Address sourceAccount)
Initializes the value for thesourceAccount
attribute.- Parameters:
sourceAccount
- The value for sourceAccount- Returns:
this
builder for use in a chained invocation
-
destinationAccount
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder destinationAccount(Address destinationAccount)
Initializes the value for thedestinationAccount
attribute.- Parameters:
destinationAccount
- The value for destinationAccount- Returns:
this
builder for use in a chained invocation
-
destinationAmount
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder destinationAmount(CurrencyAmount destinationAmount)
Initializes the value for thedestinationAmount
attribute.- Parameters:
destinationAmount
- The value for destinationAmount- Returns:
this
builder for use in a chained invocation
-
sendMax
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.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 ImmutableRipplePathFindRequestParams.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
-
addSourceCurrencies
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder addSourceCurrencies(PathCurrency element)
Adds one element tosourceCurrencies
list.- Parameters:
element
- A sourceCurrencies element- Returns:
this
builder for use in a chained invocation
-
addSourceCurrencies
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder addSourceCurrencies(PathCurrency... elements)
Adds elements tosourceCurrencies
list.- Parameters:
elements
- An array of sourceCurrencies elements- Returns:
this
builder for use in a chained invocation
-
sourceCurrencies
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder sourceCurrencies(Iterable<? extends PathCurrency> elements)
Sets or replaces all elements forsourceCurrencies
list.- Parameters:
elements
- An iterable of sourceCurrencies elements- Returns:
this
builder for use in a chained invocation
-
addAllSourceCurrencies
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder addAllSourceCurrencies(Iterable<? extends PathCurrency> elements)
Adds elements tosourceCurrencies
list.- Parameters:
elements
- An iterable of sourceCurrencies elements- Returns:
this
builder for use in a chained invocation
-
ledgerHash
@CanIgnoreReturnValue @Deprecated public final ImmutableRipplePathFindRequestParams.Builder ledgerHash(Hash256 ledgerHash)
Deprecated.Initializes the optional valueledgerHash
to ledgerHash.- Parameters:
ledgerHash
- The value for ledgerHash- Returns:
this
builder for chained invocation
-
ledgerHash
@CanIgnoreReturnValue @Deprecated public final ImmutableRipplePathFindRequestParams.Builder ledgerHash(Optional<? extends Hash256> ledgerHash)
Deprecated.Initializes the optional valueledgerHash
to ledgerHash.- Parameters:
ledgerHash
- The value for ledgerHash- Returns:
this
builder for use in a chained invocation
-
ledgerIndex
@CanIgnoreReturnValue @Deprecated public final ImmutableRipplePathFindRequestParams.Builder ledgerIndex(@Nullable LedgerIndex ledgerIndex)
Deprecated.Initializes the value for theledgerIndex
attribute.- Parameters:
ledgerIndex
- The value for ledgerIndex (can benull
)- Returns:
this
builder for use in a chained invocation
-
ledgerSpecifier
@CanIgnoreReturnValue public final ImmutableRipplePathFindRequestParams.Builder ledgerSpecifier(LedgerSpecifier ledgerSpecifier)
Initializes the value for theledgerSpecifier
attribute.If not set, this attribute will have a default value as returned by the initializer of
ledgerSpecifier
.- Parameters:
ledgerSpecifier
- The value for ledgerSpecifier- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableRipplePathFindRequestParams build()
Builds a newImmutableRipplePathFindRequestParams
.- Returns:
- An immutable instance of RipplePathFindRequestParams
- Throws:
IllegalStateException
- if any required attributes are missing
-
-