Class ImmutableAccountCurrenciesRequestParams
- java.lang.Object
-
- org.xrpl.xrpl4j.model.client.accounts.ImmutableAccountCurrenciesRequestParams
-
- All Implemented Interfaces:
AccountCurrenciesRequestParams
,XrplRequestParams
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAccountCurrenciesRequestParams extends Object implements AccountCurrenciesRequestParams
Immutable implementation ofAccountCurrenciesRequestParams
.Use the builder to create immutable instances:
ImmutableAccountCurrenciesRequestParams.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableAccountCurrenciesRequestParams.Builder
Builds instances of typeImmutableAccountCurrenciesRequestParams
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Address
account()
A unique identifier for the account, most commonly the account'sAddress
.static ImmutableAccountCurrenciesRequestParams.Builder
builder()
Creates a builder forImmutableAccountCurrenciesRequestParams
.static ImmutableAccountCurrenciesRequestParams
copyOf(AccountCurrenciesRequestParams instance)
Creates an immutable copy of aAccountCurrenciesRequestParams
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableAccountCurrenciesRequestParams
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:account
,ledgerSpecifier
,strict
.Optional<Hash256>
ledgerHash()
Deprecated.Ledger hash should be specified inledgerSpecifier()
.LedgerIndex
ledgerIndex()
Deprecated.Ledger index and any shortcut values should be specified inledgerSpecifier()
.LedgerSpecifier
ledgerSpecifier()
Specifies the ledger version to request.boolean
strict()
String
toString()
Prints the immutable valueAccountCurrenciesRequestParams
with attribute values.ImmutableAccountCurrenciesRequestParams
withAccount(Address value)
Copy the current immutable object by setting a value for theaccount
attribute.ImmutableAccountCurrenciesRequestParams
withLedgerHash(Optional<? extends Hash256> optional)
Deprecated.ImmutableAccountCurrenciesRequestParams
withLedgerHash(Hash256 value)
Deprecated.ImmutableAccountCurrenciesRequestParams
withLedgerIndex(LedgerIndex value)
Deprecated.ImmutableAccountCurrenciesRequestParams
withLedgerSpecifier(LedgerSpecifier value)
Copy the current immutable object by setting a value for theledgerSpecifier
attribute.
-
-
-
Method Detail
-
account
public Address account()
A unique identifier for the account, most commonly the account'sAddress
.- Specified by:
account
in interfaceAccountCurrenciesRequestParams
- Returns:
- The
Address
for the account.
-
ledgerHash
@Deprecated public Optional<Hash256> ledgerHash()
Deprecated.Ledger hash should be specified inledgerSpecifier()
.A 20-byte hex string for the ledger version to use.- Specified by:
ledgerHash
in interfaceAccountCurrenciesRequestParams
- Returns:
- An optionally-present
Hash256
.
-
ledgerIndex
@Deprecated @Nullable public LedgerIndex ledgerIndex()
Deprecated.Ledger index and any shortcut values should be specified inledgerSpecifier()
.The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically.- Specified by:
ledgerIndex
in interfaceAccountCurrenciesRequestParams
- Returns:
- A
LedgerIndex
. Defaults toLedgerIndex.CURRENT
.
-
ledgerSpecifier
public LedgerSpecifier ledgerSpecifier()
Specifies the ledger version to request. A ledger version can be specified by ledger hash, numerical ledger index, or a shortcut value.- Specified by:
ledgerSpecifier
in interfaceAccountCurrenciesRequestParams
- Returns:
- A
LedgerSpecifier
specifying the ledger version to request.
-
strict
public boolean strict()
A boolean indicating if theaccount()
field only accepts a public key or XRP LedgerAddress
. Always true, asaccount()
is always anAddress
.- Specified by:
strict
in interfaceAccountCurrenciesRequestParams
- Returns:
true
if the account field only accepts a public key or XRP Ledger address, otherwisefalse
. Defaults totrue
.
-
withAccount
public final ImmutableAccountCurrenciesRequestParams withAccount(Address value)
Copy the current immutable object by setting a value for theaccount
attribute. 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
this
object
-
withLedgerHash
@Deprecated public final ImmutableAccountCurrenciesRequestParams withLedgerHash(Hash256 value)
Deprecated.Copy the current immutable object by setting a present value for the optionalledgerHash
attribute.- Parameters:
value
- The value for ledgerHash- Returns:
- A modified copy of
this
object
-
withLedgerHash
@Deprecated public final ImmutableAccountCurrenciesRequestParams withLedgerHash(Optional<? extends Hash256> optional)
Deprecated.Copy the current immutable object by setting an optional value for theledgerHash
attribute. 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 ledgerHash- Returns:
- A modified copy of
this
object
-
withLedgerIndex
@Deprecated public final ImmutableAccountCurrenciesRequestParams withLedgerIndex(@Nullable LedgerIndex value)
Deprecated.Copy the current immutable object by setting a value for theledgerIndex
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for ledgerIndex (can benull
)- Returns:
- A modified copy of the
this
object
-
withLedgerSpecifier
public final ImmutableAccountCurrenciesRequestParams withLedgerSpecifier(LedgerSpecifier value)
Copy the current immutable object by setting a value for theledgerSpecifier
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for ledgerSpecifier- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableAccountCurrenciesRequestParams
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:account
,ledgerSpecifier
,strict
.
-
toString
public String toString()
Prints the immutable valueAccountCurrenciesRequestParams
with attribute values.
-
copyOf
public static ImmutableAccountCurrenciesRequestParams copyOf(AccountCurrenciesRequestParams instance)
Creates an immutable copy of aAccountCurrenciesRequestParams
value. 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 AccountCurrenciesRequestParams instance
-
builder
public static ImmutableAccountCurrenciesRequestParams.Builder builder()
Creates a builder forImmutableAccountCurrenciesRequestParams
.ImmutableAccountCurrenciesRequestParams.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // required
account
.ledgerHash(org.xrpl.xrpl4j.model.transactions.Hash256) // optionalledgerHash
.ledgerIndex(org.xrpl.xrpl4j.model.client.common.LedgerIndex | null) // nullableledgerIndex
.ledgerSpecifier(org.xrpl.xrpl4j.model.client.common.LedgerSpecifier) // optionalledgerSpecifier
.build();- Returns:
- A new ImmutableAccountCurrenciesRequestParams builder
-
-