Package com.nsdev.lettergenerator.render
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 accesspageCount- actual final page count, including any signature recovery pagediagnostics- accepted processing diagnosticsdebugBoxes- declared geometry; empty for ordinary renderingparts- 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 Summary
ConstructorsConstructorDescriptionRenderResult(byte[] pdfBytes, int pageCount, List<Diagnostic> diagnostics, List<DebugBox> debugBoxes) Preserves the original result constructor for one generated letter.RenderResult(byte[] pdfBytes, int pageCount, List<Diagnostic> diagnostics, List<DebugBox> debugBoxes, List<RenderPart> parts) Owns all mutable inputs. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedebugBoxesrecord component.Returns the value of thediagnosticsrecord component.booleanCompares PDF contents and result metadata.inthashCode()Returns a hash code value for this object.intReturns the value of thepageCountrecord component.parts()Returns the value of thepartsrecord component.byte[]pdfBytes()Returns the value of thepdfBytesrecord component.final StringtoString()Returns a string representation of this record class.
-
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 bytespageCount- final page countdiagnostics- ordered diagnostic listdebugBoxes- ordered declared geometryparts- 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 bytespageCount- complete letter page countdiagnostics- accepted processing diagnosticsdebugBoxes- declared preview geometry
-
-
Method Details
-
pdfBytes
public byte[] pdfBytes()Returns the value of thepdfBytesrecord component.- Returns:
- the value of the
pdfBytesrecord component
-
equals
Compares PDF contents and result 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. -
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. -
pageCount
public int pageCount()Returns the value of thepageCountrecord component.- Returns:
- the value of the
pageCountrecord component
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-
debugBoxes
Returns the value of thedebugBoxesrecord component.- Returns:
- the value of the
debugBoxesrecord component
-
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-