Package com.nsdev.lettergenerator.model
Record Class Section
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.Section
- Record Components:
name- section label; generation requires nonblank XML-compatible textstyle- optional section overrides, or null to inherit the document styleblocks- body content; null is preserved for generation-time validation
Named group of body blocks rendered in list order. Sections do not force page breaks or select
physical page regions; the name is a descriptive label. Style properties inherit from the
document and are overridden by individual blocks and text runs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Section
Snapshots the block list without validating the section or its content. Null lists and null entries are retained for generation-time diagnostics.- Parameters:
name- descriptive labelstyle- optional inherited-style overridesblocks- blocks to copy into an unmodifiable list, 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-