Class ImmutableSignatureWithPublicKey.Builder
java.lang.Object
org.xrpl.xrpl4j.crypto.core.signing.ImmutableSignatureWithPublicKey.Builder
- Enclosing class:
- ImmutableSignatureWithPublicKey
Builds instances of type
ImmutableSignatureWithPublicKey
.
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 TypeMethodDescriptionbuild()
Builds a newImmutableSignatureWithPublicKey
.from
(SignatureWithPublicKey instance) Fill a builder with attribute values from the providedSignatureWithPublicKey
instance.signingPublicKey
(PublicKey signingPublicKey) Initializes the value for thesigningPublicKey
attribute.transactionSignature
(Signature transactionSignature) Initializes the value for thetransactionSignature
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableSignatureWithPublicKey.Builder from(SignatureWithPublicKey instance) Fill a builder with attribute values from the providedSignatureWithPublicKey
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
-
transactionSignature
@CanIgnoreReturnValue public final ImmutableSignatureWithPublicKey.Builder transactionSignature(Signature transactionSignature) Initializes the value for thetransactionSignature
attribute.- Parameters:
transactionSignature
- The value for transactionSignature- Returns:
this
builder for use in a chained invocation
-
signingPublicKey
@CanIgnoreReturnValue public final ImmutableSignatureWithPublicKey.Builder signingPublicKey(PublicKey signingPublicKey) Initializes the value for thesigningPublicKey
attribute.- Parameters:
signingPublicKey
- The value for signingPublicKey- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableSignatureWithPublicKey
.- Returns:
- An immutable instance of SignatureWithPublicKey
- Throws:
IllegalStateException
- if any required attributes are missing
-