Record Class Signature

java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.layout.Signature
Record Components:
placement - flowing or final-page placement; required during generation
blocks - nonempty signature content; null is retained for generation-time validation
boundsMm - zone-relative rectangle in millimeters for BOTTOM_LAST, or null for FLOW

public record Signature(SignaturePlacement placement, List<Block> blocks, Bounds boundsMm) extends Record
Visual signature content, either appended to the body or positioned on the final page. This is rendered letter content, not a cryptographic PDF signature. FLOW requires null bounds; BOTTOM_LAST requires bounds inside a positive-height signature zone. Page-break blocks are invalid in both modes.
  • Constructor Details

    • Signature

      public Signature(SignaturePlacement placement, List<Block> blocks, Bounds boundsMm)
      Snapshots the blocks without checking placement, bounds, or content. Null lists and entries are preserved for generation-time validation.
      Parameters:
      placement - signature placement mode
      blocks - content to copy into an unmodifiable list, or null
      boundsMm - final-page signature-zone rectangle, or null for flow
  • Method Details

    • 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
    • hashCode

      public final 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
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • placement

      public SignaturePlacement placement()
      Returns the value of the placement record component.
      Returns:
      the value of the placement record component
    • blocks

      public List<Block> blocks()
      Returns the value of the blocks record component.
      Returns:
      the value of the blocks record component
    • boundsMm

      public Bounds boundsMm()
      Returns the value of the boundsMm record component.
      Returns:
      the value of the boundsMm record component