Package org.xrpl.xrpl4j.crypto
Class ImmutableDefaultPublicKey
java.lang.Object
org.xrpl.xrpl4j.crypto.PublicKey.DefaultPublicKey
org.xrpl.xrpl4j.crypto.ImmutableDefaultPublicKey
- All Implemented Interfaces:
PublicKey
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDefaultPublicKey
extends PublicKey.DefaultPublicKey
Immutable implementation of
PublicKey.DefaultPublicKey
.
Use the builder to create immutable instances:
ImmutableDefaultPublicKey.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDefaultPublicKey
.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.crypto.PublicKey
PublicKey.DefaultPublicKey
-
Method Summary
Modifier and TypeMethodDescriptionThe private-key value, as a Base16-encoded (i.e., HEX) string.The public-key, as a base-58 encodedString
.builder()
Creates a builder forImmutableDefaultPublicKey
.static ImmutableDefaultPublicKey
copyOf
(PublicKey.DefaultPublicKey instance) Creates an immutable copy of aPublicKey.DefaultPublicKey
value.boolean
This instance is equal to all instances ofImmutableDefaultPublicKey
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:value
,base58Encoded
,base16Encoded
,versionType
.value()
The key in binary (Note: will be 33 bytes).The type of this key.withValue
(UnsignedByteArray value) Copy the current immutable object by setting a value for thevalue
attribute.Methods inherited from class org.xrpl.xrpl4j.crypto.PublicKey.DefaultPublicKey
toString
-
Method Details
-
value
The key in binary (Note: will be 33 bytes).- Returns:
- An instance of
UnsignedByteArray
.
-
base58Encoded
Description copied from interface:PublicKey
The public-key, as a base-58 encodedString
.- Specified by:
base58Encoded
in interfacePublicKey
- Overrides:
base58Encoded
in classPublicKey.DefaultPublicKey
- Returns:
- The computed-at-construction value of the
base58Encoded
attribute
-
base16Encoded
Description copied from interface:PublicKey
The private-key value, as a Base16-encoded (i.e., HEX) string. Note that if this is an Ed25519 private-key, then this value contains a leading prefix of `ED`, in hex.- Specified by:
base16Encoded
in interfacePublicKey
- Overrides:
base16Encoded
in classPublicKey.DefaultPublicKey
- Returns:
- The computed-at-construction value of the
base16Encoded
attribute
-
versionType
Description copied from interface:PublicKey
The type of this key.- Specified by:
versionType
in interfacePublicKey
- Overrides:
versionType
in classPublicKey.DefaultPublicKey
- Returns:
- The computed-at-construction value of the
versionType
attribute
-
withValue
Copy the current immutable object by setting a value for thevalue
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for value- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableDefaultPublicKey
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:value
,base58Encoded
,base16Encoded
,versionType
. -
copyOf
Creates an immutable copy of aPublicKey.DefaultPublicKey
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 DefaultPublicKey instance
-
builder
Creates a builder forImmutableDefaultPublicKey
.ImmutableDefaultPublicKey.builder() .value(org.xrpl.xrpl4j.codec.addresses.UnsignedByteArray) // required
value
.build();- Returns:
- A new ImmutableDefaultPublicKey builder
-