Class ImmutableBatchSigner.Builder
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableBatchSigner.Builder
- Enclosing class:
ImmutableBatchSigner
Builds instances of type
ImmutableBatchSigner.
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.addAllSigners(Iterable<? extends SignerWrapper> elements) Adds elements tosignerslist.addSigners(SignerWrapper element) Adds one element tosignerslist.addSigners(SignerWrapper... elements) Adds elements tosignerslist.build()Builds a newImmutableBatchSigner.from(BatchSigner instance) Fill a builder with attribute values from the providedBatchSignerinstance.signers(Iterable<? extends SignerWrapper> elements) Sets or replaces all elements forsignerslist.signingPublicKey(Optional<? extends PublicKey> signingPublicKey) Initializes the optional valuesigningPublicKeyto signingPublicKey.signingPublicKey(PublicKey signingPublicKey) Initializes the optional valuesigningPublicKeyto signingPublicKey.sortedSigners(boolean sortedSigners) Initializes the value for thesortedSignersattribute.transactionSignature(Optional<? extends Signature> transactionSignature) Initializes the optional valuetransactionSignatureto transactionSignature.transactionSignature(Signature transactionSignature) Initializes the optional valuetransactionSignatureto transactionSignature.
-
Method Details
-
from
Fill a builder with attribute values from the providedBatchSignerinstance. 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
-
transactionSignature
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder transactionSignature(Signature transactionSignature) Initializes the optional valuetransactionSignatureto transactionSignature.- Parameters:
transactionSignature- The value for transactionSignature- Returns:
thisbuilder for chained invocation
-
transactionSignature
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder transactionSignature(Optional<? extends Signature> transactionSignature) Initializes the optional valuetransactionSignatureto transactionSignature.- Parameters:
transactionSignature- The value for transactionSignature- Returns:
thisbuilder for use in a chained invocation
-
signingPublicKey
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder signingPublicKey(PublicKey signingPublicKey) Initializes the optional valuesigningPublicKeyto signingPublicKey.- Parameters:
signingPublicKey- The value for signingPublicKey- Returns:
thisbuilder for chained invocation
-
signingPublicKey
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder signingPublicKey(Optional<? extends PublicKey> signingPublicKey) Initializes the optional valuesigningPublicKeyto signingPublicKey.- Parameters:
signingPublicKey- The value for signingPublicKey- Returns:
thisbuilder for use in a chained invocation
-
sortedSigners
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder sortedSigners(boolean sortedSigners) Initializes the value for thesortedSignersattribute.If not set, this attribute will have a default value as returned by the initializer of
sortedSigners.- Parameters:
sortedSigners- The value for sortedSigners- Returns:
thisbuilder for use in a chained invocation
-
addSigners
Adds one element tosignerslist.- Parameters:
element- A signers element- Returns:
thisbuilder for use in a chained invocation
-
addSigners
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder addSigners(SignerWrapper... elements) Adds elements tosignerslist.- Parameters:
elements- An array of signers elements- Returns:
thisbuilder for use in a chained invocation
-
signers
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder signers(Iterable<? extends SignerWrapper> elements) Sets or replaces all elements forsignerslist.- Parameters:
elements- An iterable of signers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSigners
@CanIgnoreReturnValue public final ImmutableBatchSigner.Builder addAllSigners(Iterable<? extends SignerWrapper> elements) Adds elements tosignerslist.- Parameters:
elements- An iterable of signers elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableBatchSigner.- Returns:
- An immutable instance of BatchSigner
- Throws:
IllegalStateException- if any required attributes are missing
-