Package org.xrpl.xrpl4j.model.ledger
Class ImmutableDidObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableDidObject.Builder
- Enclosing class:
ImmutableDidObject
Builds instances of type
ImmutableDidObject.
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.build()Builds a newImmutableDidObject.Initializes the optional valuedatato data.Initializes the optional valuedatato data.didDocument(Optional<? extends DidDocument> didDocument) Initializes the optional valuedidDocumentto didDocument.didDocument(DidDocument didDocument) Initializes the optional valuedidDocumentto didDocument.Fill a builder with attribute values from the providedDidObjectinstance.Initializes the value for theindexattribute.Initializes the value for theownerNodeattribute.previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.Initializes the optional valueurito uri.Initializes the optional valueurito uri.
-
Method Details
-
from
Fill a builder with attribute values from the providedDidObjectinstance. 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:
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
-
didDocument
Initializes the optional valuedidDocumentto didDocument.- Parameters:
didDocument- The value for didDocument- Returns:
thisbuilder for chained invocation
-
didDocument
@CanIgnoreReturnValue public final ImmutableDidObject.Builder didDocument(Optional<? extends DidDocument> didDocument) Initializes the optional valuedidDocumentto didDocument.- Parameters:
didDocument- The value for didDocument- Returns:
thisbuilder for use in a chained invocation
-
data
Initializes the optional valuedatato data.- Parameters:
data- The value for data- Returns:
thisbuilder for chained invocation
-
data
@CanIgnoreReturnValue public final ImmutableDidObject.Builder data(Optional<? extends DidData> data) Initializes the optional valuedatato data.- Parameters:
data- The value for data- Returns:
thisbuilder for use in a chained invocation
-
uri
Initializes the optional valueurito uri.- Parameters:
uri- The value for uri- Returns:
thisbuilder for chained invocation
-
uri
Initializes the optional valueurito uri.- Parameters:
uri- The value for uri- 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 ImmutableDidObject.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 ImmutableDidObject.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 newImmutableDidObject.- Returns:
- An immutable instance of DidObject
- Throws:
IllegalStateException- if any required attributes are missing
-