Class ImmutableSignatureWithKeyMetadata

java.lang.Object
org.xrpl.xrpl4j.crypto.core.signing.ImmutableSignatureWithKeyMetadata
All Implemented Interfaces:
SignatureWithKeyMetadata

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSignatureWithKeyMetadata extends Object implements SignatureWithKeyMetadata
Immutable implementation of SignatureWithKeyMetadata.

Use the builder to create immutable instances: ImmutableSignatureWithKeyMetadata.builder().

  • Method Details

    • transactionSignature

      public Signature transactionSignature()
      A signature for a transaction, verifiable using the SignatureWithKeyMetadata.signingKeyMetadata().
      Specified by:
      transactionSignature in interface SignatureWithKeyMetadata
      Returns:
      A Signature containing the transaction signature.
    • signingKeyMetadata

      public KeyMetadata signingKeyMetadata()
      Metadata to describe the key used to create this signature.
      Specified by:
      signingKeyMetadata in interface SignatureWithKeyMetadata
      Returns:
      A KeyMetadata containing the public key used to sign the transaction.
    • withTransactionSignature

      public final ImmutableSignatureWithKeyMetadata withTransactionSignature(Signature value)
      Copy the current immutable object by setting a value for the transactionSignature attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for transactionSignature
      Returns:
      A modified copy of the this object
    • withSigningKeyMetadata

      public final ImmutableSignatureWithKeyMetadata withSigningKeyMetadata(KeyMetadata value)
      Copy the current immutable object by setting a value for the signingKeyMetadata attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for signingKeyMetadata
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSignatureWithKeyMetadata that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: transactionSignature, signingKeyMetadata.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value SignatureWithKeyMetadata with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a SignatureWithKeyMetadata 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 SignatureWithKeyMetadata instance
    • builder

      Creates a builder for ImmutableSignatureWithKeyMetadata.
       ImmutableSignatureWithKeyMetadata.builder()
          .transactionSignature(org.xrpl.xrpl4j.crypto.core.signing.Signature) // required transactionSignature
          .signingKeyMetadata(org.xrpl.xrpl4j.crypto.core.KeyMetadata) // required signingKeyMetadata
          .build();
       
      Returns:
      A new ImmutableSignatureWithKeyMetadata builder