Class ImmutableKeyMetadata.Builder

java.lang.Object
org.xrpl.xrpl4j.crypto.ImmutableKeyMetadata.Builder
Enclosing class:
ImmutableKeyMetadata

@NotThreadSafe public static final class ImmutableKeyMetadata.Builder extends Object
Builds instances of type ImmutableKeyMetadata. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder from(KeyMetadata instance)
      Fill a builder with attribute values from the provided org.xrpl.xrpl4j.crypto.KeyMetadata instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder from(KeyMetadata.AbstractKeyMetadata instance)
      Fill a builder with attribute values from the provided org.xrpl.xrpl4j.crypto.KeyMetadata.AbstractKeyMetadata instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • platformIdentifier

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder platformIdentifier(String platformIdentifier)
      Initializes the value for the platformIdentifier attribute.
      Parameters:
      platformIdentifier - The value for platformIdentifier
      Returns:
      this builder for use in a chained invocation
    • keyringIdentifier

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder keyringIdentifier(String keyringIdentifier)
      Initializes the value for the keyringIdentifier attribute.
      Parameters:
      keyringIdentifier - The value for keyringIdentifier
      Returns:
      this builder for use in a chained invocation
    • keyIdentifier

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder keyIdentifier(String keyIdentifier)
      Initializes the value for the keyIdentifier attribute.
      Parameters:
      keyIdentifier - The value for keyIdentifier
      Returns:
      this builder for use in a chained invocation
    • keyVersion

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder keyVersion(String keyVersion)
      Initializes the value for the keyVersion attribute.
      Parameters:
      keyVersion - The value for keyVersion
      Returns:
      this builder for use in a chained invocation
    • keyPassword

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder keyPassword(String keyPassword)
      Initializes the optional value keyPassword to keyPassword.
      Parameters:
      keyPassword - The value for keyPassword
      Returns:
      this builder for chained invocation
    • keyPassword

      @CanIgnoreReturnValue public final ImmutableKeyMetadata.Builder keyPassword(Optional<String> keyPassword)
      Initializes the optional value keyPassword to keyPassword.
      Parameters:
      keyPassword - The value for keyPassword
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableKeyMetadata build()
      Builds a new ImmutableKeyMetadata.
      Returns:
      An immutable instance of KeyMetadata
      Throws:
      IllegalStateException - if any required attributes are missing