Package org.xrpl.xrpl4j.crypto
Class ImmutableKeyMetadata
java.lang.Object
org.xrpl.xrpl4j.crypto.KeyMetadata.AbstractKeyMetadata
org.xrpl.xrpl4j.crypto.ImmutableKeyMetadata
- All Implemented Interfaces:
KeyMetadata
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableKeyMetadata
extends KeyMetadata.AbstractKeyMetadata
Immutable implementation of
KeyMetadata.AbstractKeyMetadata
.
Use the builder to create immutable instances:
ImmutableKeyMetadata.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableKeyMetadata
.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.crypto.KeyMetadata
KeyMetadata.AbstractKeyMetadata
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.crypto.KeyMetadata
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableKeyMetadata.Builder
builder()
Creates a builder forImmutableKeyMetadata
.static ImmutableKeyMetadata
copyOf
(KeyMetadata.AbstractKeyMetadata instance) Creates an immutable copy of aKeyMetadata.AbstractKeyMetadata
value.boolean
This instance is equal to all instances ofImmutableKeyMetadata
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:platformIdentifier
,keyringIdentifier
,keyIdentifier
,keyVersion
,keyPassword
.The unique identifier for the private-key used to encrypt this encoded secret.An optional password that will unlock this particular key.The unique identifier of the keyring that holds the the private-key used to encrypt this encoded secret.The version of the encryption key used to encrypt this secret.The unique identifier of the platform that can decode this secret.toString()
Prints the immutable valueKeyMetadata
with attribute values.final ImmutableKeyMetadata
withKeyIdentifier
(String value) Copy the current immutable object by setting a value for thekeyIdentifier
attribute.final ImmutableKeyMetadata
withKeyPassword
(String value) Copy the current immutable object by setting a present value for the optionalkeyPassword
attribute.final ImmutableKeyMetadata
withKeyPassword
(Optional<String> optional) Copy the current immutable object by setting an optional value for thekeyPassword
attribute.final ImmutableKeyMetadata
withKeyringIdentifier
(String value) Copy the current immutable object by setting a value for thekeyringIdentifier
attribute.final ImmutableKeyMetadata
withKeyVersion
(String value) Copy the current immutable object by setting a value for thekeyVersion
attribute.final ImmutableKeyMetadata
withPlatformIdentifier
(String value) Copy the current immutable object by setting a value for theplatformIdentifier
attribute.Methods inherited from class org.xrpl.xrpl4j.crypto.KeyMetadata.AbstractKeyMetadata
doChecks
-
Method Details
-
platformIdentifier
The unique identifier of the platform that can decode this secret.- Returns:
- A
String
.
-
keyringIdentifier
The unique identifier of the keyring that holds the the private-key used to encrypt this encoded secret.- Returns:
- A
String
.
-
keyIdentifier
The unique identifier for the private-key used to encrypt this encoded secret.- Returns:
- A
String
.
-
keyVersion
The version of the encryption key used to encrypt this secret.- Returns:
- A
String
.
-
keyPassword
An optional password that will unlock this particular key. -
withPlatformIdentifier
Copy the current immutable object by setting a value for theplatformIdentifier
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for platformIdentifier- Returns:
- A modified copy of the
this
object
-
withKeyringIdentifier
Copy the current immutable object by setting a value for thekeyringIdentifier
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for keyringIdentifier- Returns:
- A modified copy of the
this
object
-
withKeyIdentifier
Copy the current immutable object by setting a value for thekeyIdentifier
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for keyIdentifier- Returns:
- A modified copy of the
this
object
-
withKeyVersion
Copy the current immutable object by setting a value for thekeyVersion
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for keyVersion- Returns:
- A modified copy of the
this
object
-
withKeyPassword
Copy the current immutable object by setting a present value for the optionalkeyPassword
attribute.- Parameters:
value
- The value for keyPassword- Returns:
- A modified copy of
this
object
-
withKeyPassword
Copy the current immutable object by setting an optional value for thekeyPassword
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for keyPassword- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableKeyMetadata
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:platformIdentifier
,keyringIdentifier
,keyIdentifier
,keyVersion
,keyPassword
. -
toString
Prints the immutable valueKeyMetadata
with attribute values. -
copyOf
Creates an immutable copy of aKeyMetadata.AbstractKeyMetadata
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 KeyMetadata instance
-
builder
Creates a builder forImmutableKeyMetadata
.ImmutableKeyMetadata.builder() .platformIdentifier(String) // required
platformIdentifier
.keyringIdentifier(String) // requiredkeyringIdentifier
.keyIdentifier(String) // requiredkeyIdentifier
.keyVersion(String) // requiredkeyVersion
.keyPassword(String) // optionalkeyPassword
.build();- Returns:
- A new ImmutableKeyMetadata builder
-