Package org.xrpl.xrpl4j.model.ledger
Class ImmutablePermissionedDomainObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutablePermissionedDomainObject.Builder
- Enclosing class:
ImmutablePermissionedDomainObject
Builds instances of type
ImmutablePermissionedDomainObject.
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 TypeMethodDescriptionacceptedCredentials(Iterable<? extends CredentialWrapper> elements) Sets or replaces all elements foracceptedCredentialslist.addAcceptedCredentials(CredentialWrapper element) Adds one element toacceptedCredentialslist.addAcceptedCredentials(CredentialWrapper... elements) Adds elements toacceptedCredentialslist.addAllAcceptedCredentials(Iterable<? extends CredentialWrapper> elements) Adds elements toacceptedCredentialslist.build()Builds a newImmutablePermissionedDomainObject.from(PermissionedDomainObject instance) Fill a builder with attribute values from the providedPermissionedDomainObjectinstance.Initializes the value for theindexattribute.Initializes the value for theownerattribute.Initializes the value for theownerNodeattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.previousTxnId(Hash256 previousTxnId) Initializes the value for thepreviousTxnIdattribute.sequence(com.google.common.primitives.UnsignedInteger sequence) Initializes the value for thesequenceattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder from(PermissionedDomainObject instance) Fill a builder with attribute values from the providedPermissionedDomainObjectinstance. 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
-
owner
Initializes the value for theownerattribute.- Parameters:
owner- The value for owner- Returns:
thisbuilder for use in a chained invocation
-
ownerNode
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder ownerNode(String ownerNode) Initializes the value for theownerNodeattribute.- Parameters:
ownerNode- The value for ownerNode- Returns:
thisbuilder for use in a chained invocation
-
sequence
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder sequence(com.google.common.primitives.UnsignedInteger sequence) Initializes the value for thesequenceattribute.- Parameters:
sequence- The value for sequence- Returns:
thisbuilder for use in a chained invocation
-
addAcceptedCredentials
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder addAcceptedCredentials(CredentialWrapper element) Adds one element toacceptedCredentialslist.- Parameters:
element- A acceptedCredentials element- Returns:
thisbuilder for use in a chained invocation
-
addAcceptedCredentials
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder addAcceptedCredentials(CredentialWrapper... elements) Adds elements toacceptedCredentialslist.- Parameters:
elements- An array of acceptedCredentials elements- Returns:
thisbuilder for use in a chained invocation
-
acceptedCredentials
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder acceptedCredentials(Iterable<? extends CredentialWrapper> elements) Sets or replaces all elements foracceptedCredentialslist.- Parameters:
elements- An iterable of acceptedCredentials elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAcceptedCredentials
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder addAllAcceptedCredentials(Iterable<? extends CredentialWrapper> elements) Adds elements toacceptedCredentialslist.- Parameters:
elements- An iterable of acceptedCredentials elements- Returns:
thisbuilder for use in a chained invocation
-
previousTxnId
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.Builder previousTxnId(Hash256 previousTxnId) Initializes the value for thepreviousTxnIdattribute.- Parameters:
previousTxnId- The value for previousTxnId- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionLedgerSequence
@CanIgnoreReturnValue public final ImmutablePermissionedDomainObject.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 newImmutablePermissionedDomainObject.- Returns:
- An immutable instance of PermissionedDomainObject
- Throws:
IllegalStateException- if any required attributes are missing
-