Record Class FixedElement
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.layout.FixedElement
- Record Components:
id- document-unique label used to identify the elementzone- reserved page region containing the elementpages- pages on which to repeat this contentboundsMm- rectangle relative to the zone's upper-left corner, in millimetersblocks- ordered region content; null is preserved for validation
public record FixedElement(String id, Zone zone, PageSelector pages, Bounds boundsMm, List<Block> blocks)
extends Record
Positioned content repeated on selected pages inside a reserved top or bottom zone. Unlike body
sections, fixed content cannot flow onto another page. Its bounds are relative to the selected
zone, not the physical page or body origin.
Generation requires unique nonblank identifiers, nonempty blocks, and bounds fitting the zone. Elements in the same zone may touch but must not overlap on any selected page. Page-break blocks are invalid here. Construction only snapshots the list.
-
Constructor Summary
ConstructorsConstructorDescriptionFixedElement(String id, Zone zone, PageSelector pages, Bounds boundsMm, List<Block> blocks) Snapshots content into an unmodifiable list while retaining null lists and entries. -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.boundsMm()Returns the value of theboundsMmrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.pages()Returns the value of thepagesrecord component.final StringtoString()Returns a string representation of this record class.zone()Returns the value of thezonerecord component.
-
Constructor Details
-
FixedElement
Snapshots content into an unmodifiable list while retaining null lists and entries. Geometry and content are validated when the document is generated.- Parameters:
id- element identifierzone- containing regionpages- page selectionboundsMm- zone-relative rectangle in millimetersblocks- content to copy, or null
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
zone
Returns the value of thezonerecord component.- Returns:
- the value of the
zonerecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
boundsMm
Returns the value of theboundsMmrecord component.- Returns:
- the value of the
boundsMmrecord component
-
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-