Class ImmutableMemo.Builder

java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableMemo.Builder
Enclosing class:
ImmutableMemo

@NotThreadSafe public static final class ImmutableMemo.Builder extends Object
Builds instances of type ImmutableMemo. 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 ImmutableMemo.Builder from(Memo instance)
      Fill a builder with attribute values from the provided Memo 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
    • memoData

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoData(String memoData)
      Initializes the optional value memoData to memoData.
      Parameters:
      memoData - The value for memoData
      Returns:
      this builder for chained invocation
    • memoData

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoData(Optional<String> memoData)
      Initializes the optional value memoData to memoData.
      Parameters:
      memoData - The value for memoData
      Returns:
      this builder for use in a chained invocation
    • memoFormat

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoFormat(String memoFormat)
      Initializes the optional value memoFormat to memoFormat.
      Parameters:
      memoFormat - The value for memoFormat
      Returns:
      this builder for chained invocation
    • memoFormat

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoFormat(Optional<String> memoFormat)
      Initializes the optional value memoFormat to memoFormat.
      Parameters:
      memoFormat - The value for memoFormat
      Returns:
      this builder for use in a chained invocation
    • memoType

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoType(String memoType)
      Initializes the optional value memoType to memoType.
      Parameters:
      memoType - The value for memoType
      Returns:
      this builder for chained invocation
    • memoType

      @CanIgnoreReturnValue public final ImmutableMemo.Builder memoType(Optional<String> memoType)
      Initializes the optional value memoType to memoType.
      Parameters:
      memoType - The value for memoType
      Returns:
      this builder for use in a chained invocation
    • build

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