Class ImmutableBook.Builder

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableBook.Builder
Enclosing class:
ImmutableBook

@NotThreadSafe public static final class ImmutableBook.Builder extends Object
Builds instances of type ImmutableBook. 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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableBook.Builder from(Book instance)
      Fill a builder with attribute values from the provided Book instance. 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:
      this builder for use in a chained invocation
    • bookDirectory

      @CanIgnoreReturnValue public final ImmutableBook.Builder bookDirectory(Hash256 bookDirectory)
      Initializes the value for the bookDirectory attribute.
      Parameters:
      bookDirectory - The value for bookDirectory
      Returns:
      this builder for use in a chained invocation
    • bookNode

      @CanIgnoreReturnValue public final ImmutableBook.Builder bookNode(String bookNode)
      Initializes the value for the bookNode attribute.
      Parameters:
      bookNode - The value for bookNode
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableBook build()
      Builds a new ImmutableBook.
      Returns:
      An immutable instance of Book
      Throws:
      IllegalStateException - if any required attributes are missing