Class ImmutablePathStep
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutablePathStep
- All Implemented Interfaces:
PathStep
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutablePathStep
extends Object
implements PathStep
Immutable implementation of
PathStep.
Use the builder to create immutable instances:
ImmutablePathStep.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaccount()static ImmutablePathStep.Builderbuilder()Creates a builder forImmutablePathStep.static ImmutablePathStepCreates an immutable copy of aPathStepvalue.currency()If present, thisPathSteprepresents changing currencies through an order book.booleanThis instance is equal to all instances ofImmutablePathStepthat have equal attribute values.inthashCode()Computes a hash code from attributes:account,currency,issuer.issuer()If present, this path step represents changing currencies and this address defines the issuer of the new currency.toString()Prints the immutable valuePathStepwith attribute values.final ImmutablePathStepwithAccount(Optional<? extends Address> optional) Copy the current immutable object by setting an optional value for theaccountattribute.final ImmutablePathStepwithAccount(Address value) Copy the current immutable object by setting a present value for the optionalaccountattribute.final ImmutablePathStepwithCurrency(String value) Copy the current immutable object by setting a present value for the optionalcurrencyattribute.final ImmutablePathStepwithCurrency(Optional<String> optional) Copy the current immutable object by setting an optional value for thecurrencyattribute.final ImmutablePathStepwithIssuer(Optional<? extends Address> optional) Copy the current immutable object by setting an optional value for theissuerattribute.final ImmutablePathStepwithIssuer(Address value) Copy the current immutable object by setting a present value for the optionalissuerattribute.
-
Method Details
-
account
If present, thisPathSteprepresents rippling through the specifiedAddress. MUST NOT be provided if thisPathStepspecifies thePathStep.currency()orPathStep.issuer()fields. -
currency
If present, thisPathSteprepresents changing currencies through an order book. The currency specified indicates the new currency. MUST NOT be provided if thisPathStepspecifies thePathStep.account()field. -
issuer
If present, this path step represents changing currencies and this address defines the issuer of the new currency. If omitted in a step with a non-XRP currency, a previous step of the path defines the issuer. If present when currency is omitted, indicates a path step that uses an order book between same-named currencies with different issuers. MUST be omitted if the currency is XRP. MUST NOT be provided if this step specifies thePathStep.account()field. -
withAccount
Copy the current immutable object by setting a present value for the optionalaccountattribute.- Parameters:
value- The value for account- Returns:
- A modified copy of
thisobject
-
withAccount
Copy the current immutable object by setting an optional value for theaccountattribute. 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 account- Returns:
- A modified copy of
thisobject
-
withCurrency
Copy the current immutable object by setting a present value for the optionalcurrencyattribute.- Parameters:
value- The value for currency- Returns:
- A modified copy of
thisobject
-
withCurrency
Copy the current immutable object by setting an optional value for thecurrencyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for currency- Returns:
- A modified copy of
thisobject
-
withIssuer
Copy the current immutable object by setting a present value for the optionalissuerattribute.- Parameters:
value- The value for issuer- Returns:
- A modified copy of
thisobject
-
withIssuer
Copy the current immutable object by setting an optional value for theissuerattribute. 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 issuer- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutablePathStepthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:account,currency,issuer. -
toString
Prints the immutable valuePathStepwith attribute values. -
copyOf
Creates an immutable copy of aPathStepvalue. 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 PathStep instance
-
builder
Creates a builder forImmutablePathStep.ImmutablePathStep.builder() .account(Address) // optionalaccount.currency(String) // optionalcurrency.issuer(Address) // optionalissuer.build();- Returns:
- A new ImmutablePathStep builder
-