Record Class Heading
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.block.Heading
- Record Components:
runs- ordered styled text; null is preserved for generation-time validationstyle- optional block overrides, layered after document and section stylessemanticStyle- optional tag defaults, below theme and explicit local overrides
- All Implemented Interfaces:
Block
public record Heading(List<TextRun> runs, Style style, Style semanticStyle)
extends Record
implements Block
Text heading kept with the following block on the same page when layout permits. Before inherited
overrides, headings default to bold 14-point Helvetica; ordinary text uses 11-point regular
Helvetica. Generation requires a nonempty list of valid text runs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.runs()Returns the value of therunsrecord component.Returns the value of thesemanticStylerecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Heading
Creates an ordinary heading without additional markup-tag defaults.- Parameters:
runs- ordered inline contentstyle- nullable explicit overrides
-
Heading
Snapshots the run list without validating text or style. Null lists and entries are preserved for generation-time diagnostics.- Parameters:
runs- runs to copy into an unmodifiable list, or nullstyle- nullable style overridessemanticStyle- nullable tag defaults
-
-
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). -
runs
Returns the value of therunsrecord component.- Returns:
- the value of the
runsrecord component
-
style
Returns the value of thestylerecord component. -
semanticStyle
Returns the value of thesemanticStylerecord component.- Returns:
- the value of the
semanticStylerecord component
-