Record Class RenderResult

java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.render.RenderResult
Record Components:
pdfBytes - complete PDF file; defensively copied on input and access
pageCount - actual final page count, including any signature recovery page
diagnostics - accepted processing diagnostics
debugBoxes - declared geometry; empty for ordinary rendering
parts - contiguous letter and attachment page ranges in output order

public record RenderResult(byte[] pdfBytes, int pageCount, List<Diagnostic> diagnostics, List<DebugBox> debugBoxes, List<RenderPart> parts) extends Record
Complete accepted PDF with actual page count and optional authoring geometry.
  • Constructor Details

    • RenderResult

      public RenderResult(byte[] pdfBytes, int pageCount, List<Diagnostic> diagnostics, List<DebugBox> debugBoxes, List<RenderPart> parts)
      Owns all mutable inputs.
      Parameters:
      pdfBytes - complete PDF bytes
      pageCount - final page count
      diagnostics - ordered diagnostic list
      debugBoxes - ordered declared geometry
      parts - ordered source ranges
    • RenderResult

      public RenderResult(byte[] pdfBytes, int pageCount, List<Diagnostic> diagnostics, List<DebugBox> debugBoxes)
      Preserves the original result constructor for one generated letter.
      Parameters:
      pdfBytes - accepted PDF bytes
      pageCount - complete letter page count
      diagnostics - accepted processing diagnostics
      debugBoxes - declared preview geometry
  • Method Details

    • pdfBytes

      public byte[] pdfBytes()
      Returns the value of the pdfBytes record component.
      Returns:
      the value of the pdfBytes record component
    • equals

      public boolean equals(Object other)
      Compares PDF contents and result metadata.
      Specified by:
      equals in class Record
      Parameters:
      other - object to compare
      Returns:
      true for equal PDF bytes and metadata
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • pageCount

      public int pageCount()
      Returns the value of the pageCount record component.
      Returns:
      the value of the pageCount record component
    • diagnostics

      public List<Diagnostic> diagnostics()
      Returns the value of the diagnostics record component.
      Returns:
      the value of the diagnostics record component
    • debugBoxes

      public List<DebugBox> debugBoxes()
      Returns the value of the debugBoxes record component.
      Returns:
      the value of the debugBoxes record component
    • parts

      public List<RenderPart> parts()
      Returns the value of the parts record component.
      Returns:
      the value of the parts record component