Package org.xrpl.xrpl4j.model.ledger
Class ImmutableBookWrapper
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableBookWrapper
- All Implemented Interfaces:
BookWrapper
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBookWrapper
extends Object
implements BookWrapper
Immutable implementation of
BookWrapper.
Use the builder to create immutable instances:
ImmutableBookWrapper.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableBookWrapper. -
Method Summary
Modifier and TypeMethodDescriptionbook()A Book object.static ImmutableBookWrapper.Builderbuilder()Creates a builder forImmutableBookWrapper.static ImmutableBookWrappercopyOf(BookWrapper instance) Creates an immutable copy of aBookWrappervalue.booleanThis instance is equal to all instances ofImmutableBookWrapperthat have equal attribute values.inthashCode()Computes a hash code from attributes:book.toString()Prints the immutable valueBookWrapperwith attribute values.final ImmutableBookWrapperCopy the current immutable object by setting a value for thebookattribute.
-
Method Details
-
book
A Book object.- Specified by:
bookin interfaceBookWrapper- Returns:
- A
Bookobject.
-
withBook
Copy the current immutable object by setting a value for thebookattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for book- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableBookWrapperthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:book. -
toString
Prints the immutable valueBookWrapperwith attribute values. -
copyOf
Creates an immutable copy of aBookWrappervalue. 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 BookWrapper instance
-
builder
Creates a builder forImmutableBookWrapper.ImmutableBookWrapper.builder() .book(org.xrpl.xrpl4j.model.ledger.Book) // requiredbook.build();- Returns:
- A new ImmutableBookWrapper builder
-