Class ImmutableDelegateObject.Builder

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

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

      @CanIgnoreReturnValue public final ImmutableDelegateObject.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
    • authorize

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

      @CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addPermissions(PermissionWrapper element)
      Adds one element to permissions list.
      Parameters:
      element - A permissions element
      Returns:
      this builder for use in a chained invocation
    • addPermissions

      @CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addPermissions(PermissionWrapper... elements)
      Adds elements to permissions list.
      Parameters:
      elements - An array of permissions elements
      Returns:
      this builder for use in a chained invocation
    • permissions

      @CanIgnoreReturnValue public final ImmutableDelegateObject.Builder permissions(Iterable<? extends PermissionWrapper> elements)
      Sets or replaces all elements for permissions list.
      Parameters:
      elements - An iterable of permissions elements
      Returns:
      this builder for use in a chained invocation
    • addAllPermissions

      @CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addAllPermissions(Iterable<? extends PermissionWrapper> elements)
      Adds elements to permissions list.
      Parameters:
      elements - An iterable of permissions elements
      Returns:
      this builder for use in a chained invocation
    • ownerNode

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

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