Record Class PositionedContent
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.layout.PositionedContent
- Record Components:
id- nonblank identifier unique within its canvas, checked at generationboundsMm- positive rectangle wholly inside the canvas, checked at generationblocks- owned ordered content; page breaks are forbidden at any nesting levelstyle- nullable inherited typography overrides
public record PositionedContent(String id, Bounds boundsMm, List<Block> blocks, Style style)
extends Record
One stable, bounded canvas element. Coordinates are millimeters from its canvas's top-left;
content order controls painting order, so later elements may overlap earlier ones.
-
Constructor Summary
Constructors -
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.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PositionedContent
Snapshots content while retaining invalid nulls for path-aware generation validation.- Parameters:
id- stable element identifierboundsMm- local rectangleblocks- content snapshot sourcestyle- nullable typography overrides
-
-
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
-
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
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-