Package org.xrpl.xrpl4j.codec.addresses
Class ImmutableDecoded
java.lang.Object
org.xrpl.xrpl4j.codec.addresses.ImmutableDecoded
- All Implemented Interfaces:
Decoded
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDecoded
extends Object
implements Decoded
Immutable implementation of
Decoded.
Use the builder to create immutable instances:
ImmutableDecoded.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDecoded.Builderbuilder()Creates a builder forImmutableDecoded.bytes()The bytes of the decoded Base58String.static ImmutableDecodedCreates an immutable copy of aDecodedvalue.booleanThis instance is equal to all instances ofImmutableDecodedthat have equal attribute values.inthashCode()Computes a hash code from attributes:version,bytes,type.toString()Prints the immutable valueDecodedwith attribute values.type()version()final ImmutableDecodedwithBytes(UnsignedByteArray value) Copy the current immutable object by setting a value for thebytesattribute.final ImmutableDecodedCopy the current immutable object by setting an optional value for thetypeattribute.final ImmutableDecodedCopy the current immutable object by setting a present value for the optionaltypeattribute.final ImmutableDecodedwithVersion(Version value) Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
version
-
bytes
The bytes of the decoded Base58String.- Specified by:
bytesin interfaceDecoded- Returns:
- An
UnsignedByteArray.
-
type
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withBytes
Copy the current immutable object by setting a value for thebytesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bytes- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a present value for the optionaltypeattribute.- Parameters:
value- The value for type- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting an optional value for thetypeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for type- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDecodedthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:version,bytes,type. -
toString
Prints the immutable valueDecodedwith attribute values. -
copyOf
Creates an immutable copy of aDecodedvalue. 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 Decoded instance
-
builder
Creates a builder forImmutableDecoded.ImmutableDecoded.builder() .version(org.xrpl.xrpl4j.codec.addresses.Version) // requiredversion.bytes(org.xrpl.xrpl4j.codec.addresses.UnsignedByteArray) // requiredbytes.type(org.xrpl.xrpl4j.codec.addresses.KeyType) // optionaltype.build();- Returns:
- A new ImmutableDecoded builder
-