Class ImmutableCheckObject.Builder

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableCheckObject.Builder
Enclosing class:
ImmutableCheckObject

@NotThreadSafe public static final class ImmutableCheckObject.Builder extends Object
Builds instances of type ImmutableCheckObject. 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 ImmutableCheckObject.Builder from(CheckObject instance)
      Fill a builder with attribute values from the provided CheckObject 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
    • account

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder account(Address account)
      Initializes the value for the account attribute.
      Parameters:
      account - The value for account
      Returns:
      this builder for use in a chained invocation
    • sourceTag

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder sourceTag(com.google.common.primitives.UnsignedInteger sourceTag)
      Initializes the optional value sourceTag to sourceTag.
      Parameters:
      sourceTag - The value for sourceTag
      Returns:
      this builder for chained invocation
    • sourceTag

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder sourceTag(Optional<? extends com.google.common.primitives.UnsignedInteger> sourceTag)
      Initializes the optional value sourceTag to sourceTag.
      Parameters:
      sourceTag - The value for sourceTag
      Returns:
      this builder for use in a chained invocation
    • destination

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder destination(Address destination)
      Initializes the value for the destination attribute.
      Parameters:
      destination - The value for destination
      Returns:
      this builder for use in a chained invocation
    • destinationTag

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder destinationTag(com.google.common.primitives.UnsignedInteger destinationTag)
      Initializes the optional value destinationTag to destinationTag.
      Parameters:
      destinationTag - The value for destinationTag
      Returns:
      this builder for chained invocation
    • destinationTag

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder destinationTag(Optional<? extends com.google.common.primitives.UnsignedInteger> destinationTag)
      Initializes the optional value destinationTag to destinationTag.
      Parameters:
      destinationTag - The value for destinationTag
      Returns:
      this builder for use in a chained invocation
    • ownerNode

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

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder previousTxnId(Hash256 previousTxnId)
      Initializes the value for the previousTxnId attribute.
      Parameters:
      previousTxnId - The value for previousTxnId
      Returns:
      this builder for use in a chained invocation
    • previousTransactionLedgerSequence

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence)
      Initializes the value for the previousTransactionLedgerSequence attribute.
      Parameters:
      previousTransactionLedgerSequence - The value for previousTransactionLedgerSequence
      Returns:
      this builder for use in a chained invocation
    • sendMax

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder sendMax(CurrencyAmount sendMax)
      Initializes the value for the sendMax attribute.
      Parameters:
      sendMax - The value for sendMax
      Returns:
      this builder for use in a chained invocation
    • sequence

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder sequence(com.google.common.primitives.UnsignedInteger sequence)
      Initializes the value for the sequence attribute.
      Parameters:
      sequence - The value for sequence
      Returns:
      this builder for use in a chained invocation
    • destinationNode

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

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

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder expiration(com.google.common.primitives.UnsignedInteger expiration)
      Initializes the optional value expiration to expiration.
      Parameters:
      expiration - The value for expiration
      Returns:
      this builder for chained invocation
    • expiration

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder expiration(Optional<? extends com.google.common.primitives.UnsignedInteger> expiration)
      Initializes the optional value expiration to expiration.
      Parameters:
      expiration - The value for expiration
      Returns:
      this builder for use in a chained invocation
    • invoiceId

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

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder invoiceId(Optional<? extends Hash256> invoiceId)
      Initializes the optional value invoiceId to invoiceId.
      Parameters:
      invoiceId - The value for invoiceId
      Returns:
      this builder for use in a chained invocation
    • index

      @CanIgnoreReturnValue public final ImmutableCheckObject.Builder index(Hash256 index)
      Initializes the value for the index attribute.
      Parameters:
      index - The value for index
      Returns:
      this builder for use in a chained invocation
    • build

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