Class ImmutableMpTokenObject.Builder

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

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

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

      @CanIgnoreReturnValue public final ImmutableMpTokenObject.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
    • mpTokenIssuanceId

      @CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder mpTokenIssuanceId(MpTokenIssuanceId mpTokenIssuanceId)
      Initializes the value for the mpTokenIssuanceId attribute.
      Parameters:
      mpTokenIssuanceId - The value for mpTokenIssuanceId
      Returns:
      this builder for use in a chained invocation
    • mptAmount

      @CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder mptAmount(MpTokenNumericAmount mptAmount)
      Initializes the value for the mptAmount attribute.

      If not set, this attribute will have a default value as returned by the initializer of mptAmount.

      Parameters:
      mptAmount - The value for mptAmount
      Returns:
      this builder for use in a chained invocation
    • lockedAmount

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

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

      @CanIgnoreReturnValue public final ImmutableMpTokenObject.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 ImmutableMpTokenObject.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
    • ownerNode

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

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

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