Class ImmutableAccountChannelsResult.Builder
- java.lang.Object
-
- org.xrpl.xrpl4j.model.client.accounts.ImmutableAccountChannelsResult.Builder
-
- Enclosing class:
- ImmutableAccountChannelsResult
@NotThreadSafe public static final class ImmutableAccountChannelsResult.Builder extends Object
Builds instances of typeImmutableAccountChannelsResult
. 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 ImmutableAccountChannelsResult.Builder from(AccountChannelsResult instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.client.accounts.AccountChannelsResult
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder from(XrplResult instance)
Fill a builder with attribute values from the providedorg.xrpl.xrpl4j.model.client.XrplResult
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder status(String status)
Initializes the optional valuestatus
to status.- Parameters:
status
- The value for status- Returns:
this
builder for chained invocation
-
status
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder status(Optional<String> status)
Initializes the optional valuestatus
to status.- Parameters:
status
- The value for status- Returns:
this
builder for use in a chained invocation
-
account
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.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
-
addChannels
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder addChannels(PaymentChannelResultObject element)
Adds one element tochannels
list.- Parameters:
element
- A channels element- Returns:
this
builder for use in a chained invocation
-
addChannels
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder addChannels(PaymentChannelResultObject... elements)
Adds elements tochannels
list.- Parameters:
elements
- An array of channels elements- Returns:
this
builder for use in a chained invocation
-
channels
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder channels(Iterable<? extends PaymentChannelResultObject> elements)
Sets or replaces all elements forchannels
list.- Parameters:
elements
- An iterable of channels elements- Returns:
this
builder for use in a chained invocation
-
addAllChannels
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder addAllChannels(Iterable<? extends PaymentChannelResultObject> elements)
Adds elements tochannels
list.- Parameters:
elements
- An iterable of channels elements- Returns:
this
builder for use in a chained invocation
-
ledgerHash
@CanIgnoreReturnValue @Deprecated public final ImmutableAccountChannelsResult.Builder ledgerHash(@Nullable Hash256 ledgerHash)
Deprecated.Initializes the value for theledgerHash
attribute.- Parameters:
ledgerHash
- The value for ledgerHash (can benull
)- Returns:
this
builder for use in a chained invocation
-
ledgerIndex
@CanIgnoreReturnValue @Deprecated public final ImmutableAccountChannelsResult.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
-
ledgerCurrentIndex
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder ledgerCurrentIndex(LedgerIndex ledgerCurrentIndex)
Initializes the optional valueledgerCurrentIndex
to ledgerCurrentIndex.- Parameters:
ledgerCurrentIndex
- The value for ledgerCurrentIndex- Returns:
this
builder for chained invocation
-
ledgerCurrentIndex
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder ledgerCurrentIndex(Optional<? extends LedgerIndex> ledgerCurrentIndex)
Initializes the optional valueledgerCurrentIndex
to ledgerCurrentIndex.- Parameters:
ledgerCurrentIndex
- The value for ledgerCurrentIndex- Returns:
this
builder for use in a chained invocation
-
validated
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder validated(boolean validated)
Initializes the value for thevalidated
attribute.If not set, this attribute will have a default value as returned by the initializer of
validated
.- Parameters:
validated
- The value for validated- Returns:
this
builder for use in a chained invocation
-
limit
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder limit(com.google.common.primitives.UnsignedInteger limit)
Initializes the optional valuelimit
to limit.- Parameters:
limit
- The value for limit- Returns:
this
builder for chained invocation
-
limit
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder limit(Optional<? extends com.google.common.primitives.UnsignedInteger> limit)
Initializes the optional valuelimit
to limit.- Parameters:
limit
- The value for limit- Returns:
this
builder for use in a chained invocation
-
marker
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder marker(Marker marker)
Initializes the optional valuemarker
to marker.- Parameters:
marker
- The value for marker- Returns:
this
builder for chained invocation
-
marker
@CanIgnoreReturnValue public final ImmutableAccountChannelsResult.Builder marker(Optional<? extends Marker> marker)
Initializes the optional valuemarker
to marker.- Parameters:
marker
- The value for marker- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableAccountChannelsResult build()
Builds a newImmutableAccountChannelsResult
.- Returns:
- An immutable instance of AccountChannelsResult
- Throws:
IllegalStateException
- if any required attributes are missing
-
-