Package org.xrpl.xrpl4j.model.ledger
Class ImmutableBook
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableBook
- All Implemented Interfaces:
Book
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBook
extends Object
implements Book
Immutable implementation of
Book.
Use the builder to create immutable instances:
ImmutableBook.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the Offer Directory that links to this offer.bookNode()A hint indicating which page of the offer directory links to this object, in case the directory consists of multiple pages.static ImmutableBook.Builderbuilder()Creates a builder forImmutableBook.static ImmutableBookCreates an immutable copy of aBookvalue.booleanThis instance is equal to all instances ofImmutableBookthat have equal attribute values.inthashCode()Computes a hash code from attributes:bookDirectory,bookNode.toString()Prints the immutable valueBookwith attribute values.final ImmutableBookwithBookDirectory(Hash256 value) Copy the current immutable object by setting a value for thebookDirectoryattribute.final ImmutableBookwithBookNode(String value) Copy the current immutable object by setting a value for thebookNodeattribute.
-
Method Details
-
bookDirectory
The ID of the Offer Directory that links to this offer.- Specified by:
bookDirectoryin interfaceBook- Returns:
- A
Hash256containing the ID.
-
bookNode
A hint indicating which page of the offer directory links to this object, in case the directory consists of multiple pages. -
withBookDirectory
Copy the current immutable object by setting a value for thebookDirectoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bookDirectory- Returns:
- A modified copy of the
thisobject
-
withBookNode
Copy the current immutable object by setting a value for thebookNodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bookNode- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableBookthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:bookDirectory,bookNode. -
toString
Prints the immutable valueBookwith attribute values. -
copyOf
Creates an immutable copy of aBookvalue. 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 Book instance
-
builder
Creates a builder forImmutableBook.ImmutableBook.builder() .bookDirectory(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredbookDirectory.bookNode(String) // requiredbookNode.build();- Returns:
- A new ImmutableBook builder
-