Class ImmutablePayChannelObject.Builder

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

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

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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
    • amount

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.Builder amount(XrpCurrencyAmount amount)
      Initializes the value for the amount attribute.
      Parameters:
      amount - The value for amount
      Returns:
      this builder for use in a chained invocation
    • balance

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.Builder balance(XrpCurrencyAmount balance)
      Initializes the value for the balance attribute.
      Parameters:
      balance - The value for balance
      Returns:
      this builder for use in a chained invocation
    • publicKey

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

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.Builder settleDelay(com.google.common.primitives.UnsignedLong settleDelay)
      Initializes the value for the settleDelay attribute.
      Parameters:
      settleDelay - The value for settleDelay
      Returns:
      this builder for use in a chained invocation
    • ownerNode

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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
    • previousTransactionId

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

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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
    • expiration

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

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

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

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

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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 ImmutablePayChannelObject.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
    • destinationTag

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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 ImmutablePayChannelObject.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
    • index

      @CanIgnoreReturnValue public final ImmutablePayChannelObject.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 ImmutablePayChannelObject build()
      Returns:
      An immutable instance of PayChannelObject
      Throws:
      IllegalStateException - if any required attributes are missing