Class ImmutableAcceptLedgerResult
java.lang.Object
org.xrpl.xrpl4j.model.client.admin.ImmutableAcceptLedgerResult
- All Implemented Interfaces:
AcceptLedgerResult,XrplResult
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAcceptLedgerResult
extends Object
implements AcceptLedgerResult
Immutable implementation of
AcceptLedgerResult.
Use the builder to create immutable instances:
ImmutableAcceptLedgerResult.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAcceptLedgerResult. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAcceptLedgerResult.static ImmutableAcceptLedgerResultcopyOf(AcceptLedgerResult instance) Creates an immutable copy of aAcceptLedgerResultvalue.booleanThis instance is equal to all instances ofImmutableAcceptLedgerResultthat have equal attribute values.inthashCode()Computes a hash code from attributes:status,ledgerCurrentIndex.The Ledger Index of the current open ledger these stats describe.status()The value"success"indicates the request was successfully received and understood by the server.toString()Prints the immutable valueAcceptLedgerResultwith attribute values.Copy the current immutable object by setting a value for theledgerCurrentIndexattribute.withStatus(String value) Copy the current immutable object by setting a present value for the optionalstatusattribute.withStatus(Optional<String> optional) Copy the current immutable object by setting an optional value for thestatusattribute.
-
Method Details
-
status
The value"success"indicates the request was successfully received and understood by the server.- Specified by:
statusin interfaceXrplResult- Returns:
- The
String"success"if the request was successful, otherwiseOptional.empty().
-
ledgerCurrentIndex
The Ledger Index of the current open ledger these stats describe.- Specified by:
ledgerCurrentIndexin interfaceAcceptLedgerResult- Returns:
- A
LedgerIndexdenoting the current ledger index.
-
withStatus
Copy the current immutable object by setting a present value for the optionalstatusattribute.- Parameters:
value- The value for status- Returns:
- A modified copy of
thisobject
-
withStatus
Copy the current immutable object by setting an optional value for thestatusattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for status- Returns:
- A modified copy of
thisobject
-
withLedgerCurrentIndex
Copy the current immutable object by setting a value for theledgerCurrentIndexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ledgerCurrentIndex- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableAcceptLedgerResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:status,ledgerCurrentIndex. -
toString
Prints the immutable valueAcceptLedgerResultwith attribute values. -
copyOf
Creates an immutable copy of aAcceptLedgerResultvalue. 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 AcceptLedgerResult instance
-
builder
Creates a builder forImmutableAcceptLedgerResult.ImmutableAcceptLedgerResult.builder() .status(String) // optionalstatus.ledgerCurrentIndex(org.xrpl.xrpl4j.model.client.common.LedgerIndex) // requiredledgerCurrentIndex.build();- Returns:
- A new ImmutableAcceptLedgerResult builder
-