Package org.xrpl.xrpl4j.model.ledger
Class ImmutableTicketObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableTicketObject
- All Implemented Interfaces:
LedgerObject,TicketObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTicketObject
extends Object
implements TicketObject
Immutable implementation of
TicketObject.
Use the builder to create immutable instances:
ImmutableTicketObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTicketObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that owns this Ticket.builder()Creates a builder forImmutableTicketObject.static ImmutableTicketObjectcopyOf(TicketObject instance) Creates an immutable copy of aTicketObjectvalue.booleanThis instance is equal to all instances ofImmutableTicketObjectthat have equal attribute values.flags()A bit-map of Boolean flags enabled for this Ticket.inthashCode()Computes a hash code from attributes:ledgerEntryType,flags,account,ownerNode,previousTransactionId,previousTransactionLedgerSequence,ticketSequence,index.index()The unique ID of theTicketObject.The type of ledger object.A hint indicating which page of the owner directory links to this object, in case the directory consists of multiple pages.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe Sequence Number this Ticket sets aside.toString()Prints the immutable valueTicketObjectwith attribute values.final ImmutableTicketObjectwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableTicketObjectCopy the current immutable object by setting a value for theindexattribute.final ImmutableTicketObjectwithOwnerNode(String value) Copy the current immutable object by setting a value for theownerNodeattribute.final ImmutableTicketObjectwithPreviousTransactionId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTransactionIdattribute.final ImmutableTicketObjectwithPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.final ImmutableTicketObjectwithTicketSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for theticketSequenceattribute.
-
Method Details
-
ledgerEntryType
The type of ledger object. In this case, always "SignerList".- Specified by:
ledgerEntryTypein interfaceTicketObject- Returns:
- Always
LedgerObject.LedgerEntryType.SIGNER_LIST.
-
flags
A bit-map of Boolean flags enabled for this Ticket. Currently, there are no flags defined for Tickets.- Specified by:
flagsin interfaceTicketObject- Returns:
- Always returns
Flags.UNSET.
-
account
The account that owns this Ticket.- Specified by:
accountin interfaceTicketObject- Returns:
- The account that owns this Ticket, as an
Address.
-
ownerNode
A hint indicating which page of the owner directory links to this object, in case the directory consists of multiple pages.- Specified by:
ownerNodein interfaceTicketObject- Returns:
- A
Stringcontaining the hint.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceTicketObject- Returns:
- A
Hash256containing the previous transaction hash.
-
previousTransactionLedgerSequence
public com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()The index of the ledger that contains the transaction that most recently modified this object.- Specified by:
previousTransactionLedgerSequencein interfaceTicketObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
ticketSequence
public com.google.common.primitives.UnsignedInteger ticketSequence()The Sequence Number this Ticket sets aside.- Specified by:
ticketSequencein interfaceTicketObject- Returns:
- An
UnsignedIntegerdenoting the sequence number.
-
index
The unique ID of theTicketObject.- Specified by:
indexin interfaceTicketObject- Returns:
- A
Hash256.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
withOwnerNode
Copy the current immutable object by setting a value for theownerNodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ownerNode- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionId
Copy the current immutable object by setting a value for thepreviousTransactionIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionId- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionLedgerSequence
public final ImmutableTicketObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionLedgerSequence- Returns:
- A modified copy of the
thisobject
-
withTicketSequence
public final ImmutableTicketObject withTicketSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for theticketSequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ticketSequence- Returns:
- A modified copy of the
thisobject
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableTicketObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,flags,account,ownerNode,previousTransactionId,previousTransactionLedgerSequence,ticketSequence,index. -
toString
Prints the immutable valueTicketObjectwith attribute values. -
copyOf
Creates an immutable copy of aTicketObjectvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TicketObject instance
-
builder
Creates a builder forImmutableTicketObject.ImmutableTicketObject.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.ownerNode(String) // requiredownerNode.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.ticketSequence(com.google.common.primitives.UnsignedInteger) // requiredticketSequence.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableTicketObject builder
-