Record Class Paragraph
java.lang.Object
java.lang.Record
com.nsdev.lettergenerator.model.block.Paragraph
- Record Components:
runs- ordered styled text; null is preserved for generation-time validationstyle- optional block overrides, layered after document and section styles
- All Implemented Interfaces:
Block
Flowing literal text that can wrap and continue across pages. Text runs retain their order,
spaces, and line feeds; they are not parsed as HTML. Generation requires a nonempty run list with
nonnull text and supported style/font values.
-
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.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Paragraph
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 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). -
runs
Returns the value of therunsrecord component.- Returns:
- the value of the
runsrecord component
-
style
Returns the value of thestylerecord component.
-