Class ImmutableAccountLinesRequestParams
- java.lang.Object
-
- org.xrpl.xrpl4j.model.client.accounts.ImmutableAccountLinesRequestParams
-
- All Implemented Interfaces:
AccountLinesRequestParams
,XrplRequestParams
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAccountLinesRequestParams extends Object implements AccountLinesRequestParams
Immutable implementation ofAccountLinesRequestParams
.Use the builder to create immutable instances:
ImmutableAccountLinesRequestParams.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableAccountLinesRequestParams.Builder
Builds instances of typeImmutableAccountLinesRequestParams
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Address
account()
The uniqueAddress
for the account.static ImmutableAccountLinesRequestParams.Builder
builder()
Creates a builder forImmutableAccountLinesRequestParams
.static ImmutableAccountLinesRequestParams
copyOf(AccountLinesRequestParams instance)
Creates an immutable copy of aAccountLinesRequestParams
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableAccountLinesRequestParams
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:account
,ledgerSpecifier
,peer
,limit
,marker
.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.Optional<com.google.common.primitives.UnsignedInteger>
limit()
Limit the number of trust lines to retrieve.Optional<Marker>
marker()
Value from a previous paginated response.Optional<Address>
peer()
TheAddress
of a second account.String
toString()
Prints the immutable valueAccountLinesRequestParams
with attribute values.ImmutableAccountLinesRequestParams
withAccount(Address value)
Copy the current immutable object by setting a value for theaccount
attribute.ImmutableAccountLinesRequestParams
withLedgerHash(Optional<? extends Hash256> optional)
Deprecated.ImmutableAccountLinesRequestParams
withLedgerHash(Hash256 value)
Deprecated.ImmutableAccountLinesRequestParams
withLedgerIndex(LedgerIndex value)
Deprecated.ImmutableAccountLinesRequestParams
withLedgerSpecifier(LedgerSpecifier value)
Copy the current immutable object by setting a value for theledgerSpecifier
attribute.ImmutableAccountLinesRequestParams
withLimit(com.google.common.primitives.UnsignedInteger value)
Copy the current immutable object by setting a present value for the optionallimit
attribute.ImmutableAccountLinesRequestParams
withLimit(Optional<? extends com.google.common.primitives.UnsignedInteger> optional)
Copy the current immutable object by setting an optional value for thelimit
attribute.ImmutableAccountLinesRequestParams
withMarker(Optional<? extends Marker> optional)
Copy the current immutable object by setting an optional value for themarker
attribute.ImmutableAccountLinesRequestParams
withMarker(Marker value)
Copy the current immutable object by setting a present value for the optionalmarker
attribute.ImmutableAccountLinesRequestParams
withPeer(Optional<? extends Address> optional)
Copy the current immutable object by setting an optional value for thepeer
attribute.ImmutableAccountLinesRequestParams
withPeer(Address value)
Copy the current immutable object by setting a present value for the optionalpeer
attribute.
-
-
-
Method Detail
-
account
public Address account()
The uniqueAddress
for the account.- Specified by:
account
in interfaceAccountLinesRequestParams
- Returns:
- The unique
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 interfaceAccountLinesRequestParams
- 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 interfaceAccountLinesRequestParams
- 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 interfaceAccountLinesRequestParams
- Returns:
- A
LedgerSpecifier
specifying the ledger version to request.
-
peer
public Optional<Address> peer()
TheAddress
of a second account. If provided, show only lines of trust connecting the two accounts.- Specified by:
peer
in interfaceAccountLinesRequestParams
- Returns:
- An optionally-present
Address
denoting the peer's account.
-
limit
public Optional<com.google.common.primitives.UnsignedInteger> limit()
Limit the number of trust lines to retrieve. The server is not required to honor this value. Must be within the inclusive range 10 to 400.- Specified by:
limit
in interfaceAccountLinesRequestParams
- Returns:
- An optionally-present
UnsignedInteger
representing the response limit.
-
marker
public Optional<Marker> marker()
Value from a previous paginated response. Resume retrieving data where that response left off.- Specified by:
marker
in interfaceAccountLinesRequestParams
- Returns:
- An optionally-present
String
containing the marker.
-
withAccount
public final ImmutableAccountLinesRequestParams 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 ImmutableAccountLinesRequestParams 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 ImmutableAccountLinesRequestParams 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 ImmutableAccountLinesRequestParams 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 ImmutableAccountLinesRequestParams 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
-
withPeer
public final ImmutableAccountLinesRequestParams withPeer(Address value)
Copy the current immutable object by setting a present value for the optionalpeer
attribute.- Parameters:
value
- The value for peer- Returns:
- A modified copy of
this
object
-
withPeer
public final ImmutableAccountLinesRequestParams withPeer(Optional<? extends Address> optional)
Copy the current immutable object by setting an optional value for thepeer
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 peer- Returns:
- A modified copy of
this
object
-
withLimit
public final ImmutableAccountLinesRequestParams withLimit(com.google.common.primitives.UnsignedInteger value)
Copy the current immutable object by setting a present value for the optionallimit
attribute.- Parameters:
value
- The value for limit- Returns:
- A modified copy of
this
object
-
withLimit
public final ImmutableAccountLinesRequestParams withLimit(Optional<? extends com.google.common.primitives.UnsignedInteger> optional)
Copy the current immutable object by setting an optional value for thelimit
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for limit- Returns:
- A modified copy of
this
object
-
withMarker
public final ImmutableAccountLinesRequestParams withMarker(Marker value)
Copy the current immutable object by setting a present value for the optionalmarker
attribute.- Parameters:
value
- The value for marker- Returns:
- A modified copy of
this
object
-
withMarker
public final ImmutableAccountLinesRequestParams withMarker(Optional<? extends Marker> optional)
Copy the current immutable object by setting an optional value for themarker
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 marker- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableAccountLinesRequestParams
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:account
,ledgerSpecifier
,peer
,limit
,marker
.
-
toString
public String toString()
Prints the immutable valueAccountLinesRequestParams
with attribute values.
-
copyOf
public static ImmutableAccountLinesRequestParams copyOf(AccountLinesRequestParams instance)
Creates an immutable copy of aAccountLinesRequestParams
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 AccountLinesRequestParams instance
-
builder
public static ImmutableAccountLinesRequestParams.Builder builder()
Creates a builder forImmutableAccountLinesRequestParams
.ImmutableAccountLinesRequestParams.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
.peer(org.xrpl.xrpl4j.model.transactions.Address) // optionalpeer
.limit(com.google.common.primitives.UnsignedInteger) // optionallimit
.marker(org.xrpl.xrpl4j.model.transactions.Marker) // optionalmarker
.build();- Returns:
- A new ImmutableAccountLinesRequestParams builder
-
-