Package org.xrpl.xrpl4j.model.ledger
Class ImmutableIssue
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableIssue
- All Implemented Interfaces:
Issue
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableIssue
extends Object
implements Issue
Immutable implementation of
Issue.
Use the builder to create immutable instances:
ImmutableIssue.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableIssue.Builderbuilder()Creates a builder forImmutableIssue.static ImmutableIssueCreates an immutable copy of aIssuevalue.currency()Either a 3 character currency code, or a 40 character hexadecimal encoded currency code value.booleanThis instance is equal to all instances ofImmutableIssuethat have equal attribute values.inthashCode()Computes a hash code from attributes:currency,issuer.issuer()TheAddressof the issuer of the currency, or empty if the currency is XRP.toString()Prints the immutable valueIssuewith attribute values.final ImmutableIssuewithCurrency(String value) Copy the current immutable object by setting a value for thecurrencyattribute.final ImmutableIssuewithIssuer(Optional<? extends Address> optional) Copy the current immutable object by setting an optional value for theissuerattribute.final ImmutableIssuewithIssuer(Address value) Copy the current immutable object by setting a present value for the optionalissuerattribute.
-
Method Details
-
currency
Either a 3 character currency code, or a 40 character hexadecimal encoded currency code value. -
issuer
TheAddressof the issuer of the currency, or empty if the currency is XRP. -
withCurrency
Copy the current immutable object by setting a value for thecurrencyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for currency- Returns:
- A modified copy of the
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 ofImmutableIssuethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:currency,issuer. -
toString
Prints the immutable valueIssuewith attribute values. -
copyOf
Creates an immutable copy of aIssuevalue. 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 Issue instance
-
builder
Creates a builder forImmutableIssue.ImmutableIssue.builder() .currency(String) // requiredcurrency.issuer(org.xrpl.xrpl4j.model.transactions.Address) // optionalissuer.build();- Returns:
- A new ImmutableIssue builder
-