Package org.xrpl.xrpl4j.codec.addresses
Class ImmutableClassicAddress
java.lang.Object
org.xrpl.xrpl4j.codec.addresses.ImmutableClassicAddress
- All Implemented Interfaces:
ClassicAddress
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableClassicAddress
extends Object
implements ClassicAddress
Immutable implementation of
ClassicAddress.
Use the builder to create immutable instances:
ImmutableClassicAddress.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableClassicAddress. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableClassicAddress.A classic address, as anAddress.static ImmutableClassicAddresscopyOf(ClassicAddress instance) Creates an immutable copy of aClassicAddressvalue.booleanThis instance is equal to all instances ofImmutableClassicAddressthat have equal attribute values.inthashCode()Computes a hash code from attributes:classicAddress,tag,test.com.google.common.primitives.UnsignedIntegertag()The tag of the classic address.booleantest()Whether or not this address exists on mainnet or testnet.toString()Prints the immutable valueClassicAddresswith attribute values.final ImmutableClassicAddresswithClassicAddress(Address value) Copy the current immutable object by setting a value for theclassicAddressattribute.final ImmutableClassicAddresswithTag(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thetagattribute.final ImmutableClassicAddresswithTest(boolean value) Copy the current immutable object by setting a value for thetestattribute.
-
Method Details
-
classicAddress
A classic address, as anAddress.- Specified by:
classicAddressin interfaceClassicAddress- Returns:
- An
Addresscontaining the classic address.
-
tag
public com.google.common.primitives.UnsignedInteger tag()The tag of the classic address.- Specified by:
tagin interfaceClassicAddress- Returns:
- An
UnsignedInteger.
-
test
public boolean test()Whether or not this address exists on mainnet or testnet.- Specified by:
testin interfaceClassicAddress- Returns:
trueif it is a tesnet address,falseif it is mainnet.
-
withClassicAddress
Copy the current immutable object by setting a value for theclassicAddressattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for classicAddress- Returns:
- A modified copy of the
thisobject
-
withTag
Copy the current immutable object by setting a value for thetagattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tag- Returns:
- A modified copy of the
thisobject
-
withTest
Copy the current immutable object by setting a value for thetestattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for test- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableClassicAddressthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:classicAddress,tag,test. -
toString
Prints the immutable valueClassicAddresswith attribute values. -
copyOf
Creates an immutable copy of aClassicAddressvalue. 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 ClassicAddress instance
-
builder
Creates a builder forImmutableClassicAddress.ImmutableClassicAddress.builder() .classicAddress(org.xrpl.xrpl4j.model.transactions.Address) // requiredclassicAddress.tag(com.google.common.primitives.UnsignedInteger) // requiredtag.test(boolean) // requiredtest.build();- Returns:
- A new ImmutableClassicAddress builder
-