Class ImmutableSignedTransaction.Builder<T extends Transaction>

java.lang.Object
org.xrpl.xrpl4j.crypto.signing.ImmutableSignedTransaction.Builder<T>
Enclosing class:
ImmutableSignedTransaction<T extends Transaction>

@NotThreadSafe public static final class ImmutableSignedTransaction.Builder<T extends Transaction> extends Object
Builds instances of type ImmutableSignedTransaction. 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 ImmutableSignedTransaction.Builder<T> from(SignedTransaction<T> instance)
      Fill a builder with attribute values from the provided SignedTransaction instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • unsignedTransaction

      @CanIgnoreReturnValue public final ImmutableSignedTransaction.Builder<T> unsignedTransaction(T unsignedTransaction)
      Initializes the value for the unsignedTransaction attribute.
      Parameters:
      unsignedTransaction - The value for unsignedTransaction
      Returns:
      this builder for use in a chained invocation
    • signedTransaction

      @CanIgnoreReturnValue public final ImmutableSignedTransaction.Builder<T> signedTransaction(T signedTransaction)
      Initializes the value for the signedTransaction attribute.
      Parameters:
      signedTransaction - The value for signedTransaction
      Returns:
      this builder for use in a chained invocation
    • signedTransactionBytes

      @CanIgnoreReturnValue public final ImmutableSignedTransaction.Builder<T> signedTransactionBytes(UnsignedByteArray signedTransactionBytes)
      Initializes the value for the signedTransactionBytes attribute.
      Parameters:
      signedTransactionBytes - The value for signedTransactionBytes
      Returns:
      this builder for use in a chained invocation
    • signature

      @CanIgnoreReturnValue public final ImmutableSignedTransaction.Builder<T> signature(Signature signature)
      Initializes the value for the signature attribute.
      Parameters:
      signature - The value for signature
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableSignedTransaction<T> build()
      Returns:
      An immutable instance of SignedTransaction
      Throws:
      IllegalStateException - if any required attributes are missing