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().

  • Method Details

    • book

      public Book book()
      A Book object.
      Specified by:
      book in interface BookWrapper
      Returns:
      A Book object.
    • withBook

      public final ImmutableBookWrapper withBook(Book value)
      Copy the current immutable object by setting a value for the book attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for book
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableBookWrapper that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: book.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value BookWrapper with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableBookWrapper copyOf(BookWrapper instance)
      Creates an immutable copy of a BookWrapper value. 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

      public static ImmutableBookWrapper.Builder builder()
      Creates a builder for ImmutableBookWrapper.
       ImmutableBookWrapper.builder()
          .book(org.xrpl.xrpl4j.model.ledger.Book) // required book
          .build();
       
      Returns:
      A new ImmutableBookWrapper builder