Package org.xrpl.xrpl4j.model.ledger
Class ImmutableDelegateObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableDelegateObject.Builder
- Enclosing class:
ImmutableDelegateObject
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 Summary
Modifier and TypeMethodDescriptionInitializes the value for theaccountattribute.addAllPermissions(Iterable<? extends PermissionWrapper> elements) Adds elements topermissionslist.addPermissions(PermissionWrapper element) Adds one element topermissionslist.addPermissions(PermissionWrapper... elements) Adds elements topermissionslist.Initializes the value for theauthorizeattribute.build()Builds a newImmutableDelegateObject.from(DelegateObject instance) Fill a builder with attribute values from the providedDelegateObjectinstance.Initializes the value for theindexattribute.Initializes the value for theownerNodeattribute.permissions(Iterable<? extends PermissionWrapper> elements) Sets or replaces all elements forpermissionslist.previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedDelegateObjectinstance. 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:
thisbuilder for use in a chained invocation
-
account
Initializes the value for theaccountattribute.- Parameters:
account- The value for account- Returns:
thisbuilder for use in a chained invocation
-
authorize
Initializes the value for theauthorizeattribute.- Parameters:
authorize- The value for authorize- Returns:
thisbuilder for use in a chained invocation
-
addPermissions
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addPermissions(PermissionWrapper element) Adds one element topermissionslist.- Parameters:
element- A permissions element- Returns:
thisbuilder for use in a chained invocation
-
addPermissions
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addPermissions(PermissionWrapper... elements) Adds elements topermissionslist.- Parameters:
elements- An array of permissions elements- Returns:
thisbuilder for use in a chained invocation
-
permissions
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder permissions(Iterable<? extends PermissionWrapper> elements) Sets or replaces all elements forpermissionslist.- Parameters:
elements- An iterable of permissions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPermissions
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder addAllPermissions(Iterable<? extends PermissionWrapper> elements) Adds elements topermissionslist.- Parameters:
elements- An iterable of permissions elements- Returns:
thisbuilder for use in a chained invocation
-
ownerNode
Initializes the value for theownerNodeattribute.- Parameters:
ownerNode- The value for ownerNode- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.- Parameters:
previousTransactionId- The value for previousTransactionId- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionLedgerSequence
@CanIgnoreReturnValue public final ImmutableDelegateObject.Builder previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.- Parameters:
previousTransactionLedgerSequence- The value for previousTransactionLedgerSequence- Returns:
thisbuilder for use in a chained invocation
-
index
Initializes the value for theindexattribute.- Parameters:
index- The value for index- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDelegateObject.- Returns:
- An immutable instance of DelegateObject
- Throws:
IllegalStateException- if any required attributes are missing
-