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
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableClassicAddress
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableClassicAddress
.A classic address, as anAddress
.static ImmutableClassicAddress
copyOf
(ClassicAddress instance) Creates an immutable copy of aClassicAddress
value.boolean
This instance is equal to all instances ofImmutableClassicAddress
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:classicAddress
,tag
,test
.com.google.common.primitives.UnsignedInteger
tag()
The tag of the classic address.boolean
test()
Whether or not this address exists on mainnet or testnet.toString()
Prints the immutable valueClassicAddress
with attribute values.final ImmutableClassicAddress
withClassicAddress
(Address value) Copy the current immutable object by setting a value for theclassicAddress
attribute.final ImmutableClassicAddress
withTag
(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thetag
attribute.final ImmutableClassicAddress
withTest
(boolean value) Copy the current immutable object by setting a value for thetest
attribute.
-
Method Details
-
classicAddress
A classic address, as anAddress
.- Specified by:
classicAddress
in interfaceClassicAddress
- Returns:
- An
Address
containing the classic address.
-
tag
public com.google.common.primitives.UnsignedInteger tag()The tag of the classic address.- Specified by:
tag
in interfaceClassicAddress
- Returns:
- An
UnsignedInteger
.
-
test
public boolean test()Whether or not this address exists on mainnet or testnet.- Specified by:
test
in interfaceClassicAddress
- Returns:
true
if it is a tesnet address,false
if it is mainnet.
-
withClassicAddress
Copy the current immutable object by setting a value for theclassicAddress
attribute. 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
this
object
-
withTag
Copy the current immutable object by setting a value for thetag
attribute. 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
this
object
-
withTest
Copy the current immutable object by setting a value for thetest
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableClassicAddress
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:classicAddress
,tag
,test
. -
toString
Prints the immutable valueClassicAddress
with attribute values. -
copyOf
Creates an immutable copy of aClassicAddress
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 ClassicAddress instance
-
builder
Creates a builder forImmutableClassicAddress
.ImmutableClassicAddress.builder() .classicAddress(org.xrpl.xrpl4j.model.transactions.Address) // required
classicAddress
.tag(com.google.common.primitives.UnsignedInteger) // requiredtag
.test(boolean) // requiredtest
.build();- Returns:
- A new ImmutableClassicAddress builder
-