Package org.xrpl.xrpl4j.model.ledger
Class ImmutableTicketObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableTicketObject.Builder
- Enclosing class:
ImmutableTicketObject
Builds instances of type
ImmutableTicketObject.
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 newImmutableTicketObject.from(TicketObject instance) Fill a builder with attribute values from the providedTicketObjectinstance.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.ticketSequence(com.google.common.primitives.UnsignedInteger ticketSequence) Initializes the value for theticketSequenceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedTicketObjectinstance. 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
-
ownerNode
Initializes the value for theownerNodeattribute.- Parameters:
ownerNode- The value for ownerNode- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableTicketObject.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 ImmutableTicketObject.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
-
ticketSequence
@CanIgnoreReturnValue public final ImmutableTicketObject.Builder ticketSequence(com.google.common.primitives.UnsignedInteger ticketSequence) Initializes the value for theticketSequenceattribute.- Parameters:
ticketSequence- The value for ticketSequence- 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 newImmutableTicketObject.- Returns:
- An immutable instance of TicketObject
- Throws:
IllegalStateException- if any required attributes are missing
-